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?
You should be able to get the proper frontMaterial values using gl_FrontMaterial, I don’t think you have to pass them in as a uniform, though that is also an option.
Have you tried setting the fragment to gl_FrontMaterial.Ambient so you can see what colour it holds?
thx for ya advise I finally find my error,its my own logical error,wot a shame.
By the way, do ya guy have a detailed document on GLSL which describ the differences between ATI & Nvidia Card,I use dynamic indexing on Nvidia card 6150LE it compile & run without error,but It failed to compile and link when it comes to ATI card. 1350,as far as I know that 1350 also belongs to SM2.0 card category,so I wonder why.