Closed AyushKoul00 closed 2 years ago
Pay attention to the number on the time step and just enter it instead of using the time variable for now... I'm sure there is a non hack way too 😎 but I'm not familiar.
@gschian0 could you write the command of what you mean? I am sorry I am new to this
Instead of using "u_time" variable enter any floating decimal number with the decimal point. ... "0.0" to start?
If you're using sin...
sin(2.* 3.1415 + (u_time));
To..
sin(2. * 3.1415 + 0.0);
Yes, probably you want to check the test examples:
cd examples/2D/00_test
glslViewer test.frag in.png -e screenshot,screenshot.png
This will run the example and create a screenshot.png
image of the first frame. Like @gschian0 said, if you don't use u_time
or any other time dependent variable your image will be static. You can always use the screenshot,image.png
command on the console interface to make a new screenshot.
Cheers!
@patriciogonzalezvivo you mentioned that if i dont use time in my code, it will be static. But internally, will the shader still run each frame? The reason i am asking is, i am trying to create a ray tracer and i only want it to render once because making it render each frame will be very slow. So even if the scene is static, if my shader is called each frame internally, then it still would be slow
If there is no u_time
, u_mouse
or u_data
on your code or videos loaded, glslViewer don't render all the time.
Like shadertoy, I just want to run my fragment shader and render a single frame (in shadertoy, I can just hit pause). Can I do something like that in this?