Jump to: navigation, search

Shader Coding - Best Practices

121 bytes added, 15:30, 22 February 2014
Fragment Shaders
== Fragment Shaders ==
{{Note|To check if your shader is working, add use a trivial shader like this as one or just add the last lineto the end of the shader, it should turn all pixels black:
<syntaxhighlight lang="glsl">
#version 120
void main() {
// turn all pixels into black
gl_FragColor = vec4 (0.0,0.0,0.0,1.0);

Navigation menu