Skip to content

Commit 7f90fba

Browse files
authored
Update documentation on ShaderToy uniforms
Clarify the explanation of ShaderToy uniforms and vertex shaders.
1 parent 3acaa62 commit 7f90fba

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

docs/index.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ All shader code here is written to be valid **GLSL** or **OpenGL Shading Languag
88
## Variables
99

1010
```js
11-
Shader Inputs
11+
// ShaderToy uniforms
1212
uniform vec3 iResolution; // viewport resolution (in pixels)
1313
uniform float iTime; // shader playback time (in seconds)
1414
uniform float iTimeDelta; // render time (in seconds)
@@ -23,6 +23,10 @@ uniform vec4 iDate; // (year, month, day, time in seconds)
2323

2424
These are the uniforms defined by **ShaderToy**, and the shader examples in this library use them, as mentioned before, for ease of testing.
2525

26+
If ShaderToy does not have a uniform for a certain thing that the shader requires, it will be explained in the article, and the uniforms will still follow the naming convention for ShaderToy. An example of this is **vertex shaders**. As ShaderToy is mainly a playground for **fragment shaders**, there's nothing like `uniform mat4 iModel;`. However, we still have a section for vertex shaders, they just won't be able to run in the ShaderToy environment.
27+
28+
Articles will explain any uniforms not available in ShaderToy, and you can refer back here to get an explanation for any uniforms which are available in ShaderToy.
29+
2630
Other shading langages, such as Godot's shader language, are quite similar to GLSL, and therefore easy to adapt these shaders to.
2731

2832
## Contributing

0 commit comments

Comments
 (0)