20,741
edits
m (→Vertex Shaders: removing as per i4dnf's expert advice) |
|||
Line 22: | Line 22: | ||
== Fragment Shaders == | == Fragment Shaders == | ||
{{Note|To check if your shader is working, add | {{Note|To check if your shader is working, use a trivial shader like this one or just add the last line to the end of the shader, it should turn all pixels black: | ||
<syntaxhighlight lang="glsl"> | <syntaxhighlight lang="glsl"> | ||
#version 120 | |||
void main() { | |||
// turn all pixels into black | |||
gl_FragColor = vec4 (0.0,0.0,0.0,1.0); | gl_FragColor = vec4 (0.0,0.0,0.0,1.0); | ||
} | |||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | }} |