diff options
| author | Hunter Kvalevog <hunter@kvog.sh> | 2026-07-03 21:40:32 -0500 |
|---|---|---|
| committer | Hunter Kvalevog <hunter@kvog.sh> | 2026-07-03 21:40:32 -0500 |
| commit | 5e42a257692a2010fca0af459ee53b935889c1c0 (patch) | |
| tree | 2d408ab3abaa267b1c3a404382a97edbf6ef9aae /ffmpeg-shadertoy/ffmpeg-shadertoy.c | |
| parent | 12c132006c97502d30ff51d245102c3eb1a7a37f (diff) | |
ffmpeg-shadertoy: add iFrame uniform
Diffstat (limited to 'ffmpeg-shadertoy/ffmpeg-shadertoy.c')
| -rw-r--r-- | ffmpeg-shadertoy/ffmpeg-shadertoy.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ffmpeg-shadertoy/ffmpeg-shadertoy.c b/ffmpeg-shadertoy/ffmpeg-shadertoy.c index c7779ea..3153920 100644 --- a/ffmpeg-shadertoy/ffmpeg-shadertoy.c +++ b/ffmpeg-shadertoy/ffmpeg-shadertoy.c @@ -238,6 +238,7 @@ int main(int argc, const char **argv) const char *fs_src1 = "#version 330 core \n" " \n" + "uniform float iFrame; \n" "uniform vec4 iMouse; \n" "uniform vec3 iResolution; \n" "uniform float iTime; \n" @@ -303,6 +304,7 @@ int main(int argc, const char **argv) quit |= (evt.type == SDL_EVENT_KEY_DOWN && evt.key.key == SDLK_Q); } + glUniform1f(glGetUniformLocation(prog, "iFrame"), (int)frame_pts); glUniform1f(glGetUniformLocation(prog, "iTime"), t); glDrawElements(GL_TRIANGLES, 6, GL_UNSIGNED_SHORT, 0); |