mrdoob / glsl-sandbox

Shader editor and gallery.
https://glslsandbox.com/
MIT License
1.55k stars 260 forks source link

Draw once when time & mouse uniforms are not utilized. #24

Closed jpryne closed 10 years ago

jpryne commented 10 years ago

How about letting the gpu take a nap while we're thinking? Currently, it just keeps redrawing & running the battery down even if nothing is changing.

emackey commented 10 years ago

Hard to say for certain that "nothing" is changing. Time, mouse, backBuffer, surfacePosition, and window size can all affect the results.

More broadly though, this is not in the spirit of GLSL Sandbox. It's a site for prototyping and demoing shaders, and the best ones here always have something going on.

Note that we do make use of requestAnimationFrame, which means if you minimize the browser or switch to another tab, it will stop drawing.