![]() |
![]() |
OpenGL Shading Language Tutorials |
Using Uniform Variables in Fragment ShadersUsing uniform variables in fragment shaders is exactly the same like in vertex shaders: A simple OGLSL Fragment Shader
This fragment program receives a color (3 component float vector) from the C++ program and sets the fragment color to this value.
C++
Now we can communicate to the Vertex and Fragment shader.
Author: Martin Christen, christen@clockworkcoders.com (source code is included in Tutorial Version 0.1 and higher)
|
|
© 2003 by Martin Christen. All Rights Reserved. |