Closed fekga closed 5 years ago
Yes, I see. Maybe I should add a special action menu item for that. Put it on the list.
Adding the actual frame's index as a uniform integer can work too like Shadertoy does it.
@fekga I would really like to see that feature. Should be rather easy to implement and would enable stuff like this (https://blog.demofox.org/2016/02/29/fast-voronoi-diagrams-and-distance-dield-textures-on-the-gpu-with-the-jump-flooding-algorithm/) (Jump Flood Algorithm requires several iterations and the current index). I implemented this shader anyway, but it is unreliable, as it depends on a constant framerate.
@markusfisch It just appeared to me that you recently added this exact feature 😄 Thanks! I really love your project; keep up the great work! I suggest closing this issue.
@fekga @Robert-K Yes, it's in 2.15.0 now and I've got to say I'm a bit ashamed I kept this issue for such a long time since it was a really small thing to add 🙈
The new frame counting uniform is int frame
and it starts with 0.
Please note, a signed integer in medium precision has only a guaranteed minimum range of 2^15. Rendering at 60 frames per second, the counter may wrap after 32768 / 60 = ~546 seconds or ~9 minutes. I couldn't use an unsigned integer (2^16) because many GLSL ES 2 doesn't support uint
unfortunately.
I created some shaders with heavy raymarching computations which are rendering with less than 10 fps. I then tried to render only one frame but I had to hack it in GLSL like this:
I understand that it can't be used as wallpaper with rendering speeds as low as this, but it would be a nice feature to create a still image. Also saving the rendered frame as an image would be a nice thing (instead of screenshotting and cropping)