Skip to content

Instantly share code, notes, and snippets.

@fand
Last active December 21, 2022 03:15
Show Gist options
  • Save fand/4c7b80a12b95eb40a4a5e88aad2b9055 to your computer and use it in GitHub Desktop.
Save fand/4c7b80a12b95eb40a4a5e88aad2b9055 to your computer and use it in GitHub Desktop.
GLSL uniform values conversion table

GLSL uniform values conversion table

This is a conversion table for uniform values on these websites / environments.

Requests welcome!

Uniforms

- Shadertoy GLSL Sandbox The book of shaders Kodelife filters ISF
Current time float iGlobalTime float time float u_time float time float iTime float TIME
sec / fps float iTimeDelta - - - - float TIMEDELTA
Frame count int iFrame - - - - int FRAMEINDEX
Channel time float iChannelTime[4] - - - - -
Channel resolution vec3 iChannelResolution[4] - - - - -
Mouse position vec4 iMouse vec2 mouse vec2 u_mouse vec2 mouse - -
Canvas size vec2 iResolution vec2 resolution vec2 u_resolution vec2 resolution vec2 iResolution -
Actual canvas size - vec2 surfaceSize - - - -
Fragment position vec2 fragCoord vec4 gl\_FragCoord vec4 gl\_FragCoord - vec2 iScreen ((0,0) to (1,1)) vec2 isf_FragNormCoord ((0,0) to (1,1))
Channel inputs sampler2D iChannel0..3 - - - - -
Channel inputs samplerCube iChannel0..3 - - - - -
Date vec4 iDate (Y,M,D,s) - - - - vec4 DATE (Y,M,D,s)
Sample rate of sound float iSampleRate - - - - -
Last frame - sampler2D backbuffer - - - -
Camera input - - - - sampler2D iCamera -
Scroll position - - - - float iPosition -
Pinched size - - - - float iSize -
Sound spectrum - - - vec3 spectrum - -
Current pass - - - - - int PASSINDEX
Pass size - - - - - int RENDERSIZE

Output

Shadertoy GLSL Sandbox The book of shader Kodelife filters ISF
vec4 fragColor vec4 gl_FragColor vec4 gl_FragColor vec4 fragColor vec4 gl_FragColor vec4 gl_FragColor
@MacroMachines
Copy link

also Shadertoy now has iTime.. this is a useful list!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment