Rendering, OpenGL, and Lighting - Caltech
Rendering, OpenGL, and Lighting - Caltech
Rendering, OpenGL, and Lighting - Caltech
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Setting uniforms• L = glGetUniformLocation(p, "variableName");• glUniform1f(L, value);– Use glUniform1i for integer uniforms, etc.• Shaders must declare the variable outside of themain() function using the uniform keyword