First example of course shows to me a uniform color, but second simply shows nothing, like color is always 0, which is not the case (I tried to visualize it). Could someone help me, please ? thanks. I´m using Linux, nVidia GeForce 6600, 256 Mb, driver is 76.67
I don’t have an NV card to try this out on, but the shader works on the hardware I’m using. I did notice a couple of things in your shader that could be improved, you are using gl_TexCoord[0] yet are only using three components. It may be better to specify a vec3 varying in your vertex shader instead of using a vec4 and only ever touching 3 components of it. The same logic would apply to your vec4 color that you set in the fragment shader. Why not declare this as a vec2 since you’re only using the red and green components? Try this and see if it works, both versions gave me the same output (the second shader you’d posted as well as the one I’ve posted below) using a 3Dlabs Wildcat Realizm 100 card.