Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 9627b228 authored by TAVERNIER Vincent's avatar TAVERNIER Vincent
Browse files

Replace iGlobalTime with iTime

parent 0ec25ca2
No related branches found
Tags v0.0.1
No related merge requests found
......@@ -31,7 +31,7 @@ See the `examples/` folder on how to use this library.
Note that only `iResolution`, `iTimeDelta`, `iFrameRate`, `iChannel0`,
`iChannel1`, `iChannel2` and `iChannel3` are automatically maintained by the
library render context. The host is responsible for updating other uniforms,
such as `iFrame`, `iGlobalTime` and such.
such as `iFrame`, `iTime` and such.
## Building the examples
......
......@@ -98,7 +98,7 @@ int main(int argc, char *argv[])
while (t < 5.)
{
// Update uniforms
context.GetState().V<shadertoy::iGlobalTime>() = t;
context.GetState().V<shadertoy::iTime>() = t;
context.GetState().V<shadertoy::iFrame>() = frameCount;
// Render to texture
......
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
vec2 uv = fragCoord.xy / iResolution.xy;
fragColor = vec4(uv,0.5+0.5*sin(iGlobalTime),1.0);
fragColor = vec4(uv,0.5+0.5*sin(iTime),1.0);
}
......@@ -319,7 +319,7 @@ namespace shadertoy
/// Default program state typedef
typedef ShaderInputs<
iResolution,
iGlobalTime,
iTime,
iTimeDelta,
iFrame,
iFrameRate,
......
......@@ -7,7 +7,7 @@ namespace shadertoy
DECLARE_UNIFORM(oglplus::Vec3f, iResolution, "vec3");
// Current time in seconds
DECLARE_UNIFORM(GLfloat, iGlobalTime, "float");
DECLARE_UNIFORM(GLfloat, iTime, "float");
// Time it takes to render a frame, in seconds
DECLARE_UNIFORM(GLfloat, iTimeDelta, "float");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment