Hi,guys,its my first post here,and I need some help abt GLSL,in C++ I executed command
glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, ambient);
pass material attribute to shaders,and in PS I wrote:
ambient += gl_LightSource[i].ambient * gl_FrontMaterial.ambient;
Im pretty much sure there is value in array ambient,but when I use GLSL devil to debug this GLSL,I realized that my gl_FrontMaterial.Ambient just give zero value.
So I wonder why my information are not transfered into Shader,Am I have to pass those information via self-defined uniformed slot?