vec4 diffuseLighting(int X) {
return gl_LightSource[X].diffuse;
}
void main()
{
gl_FragColor = diffuseLighting(1);
}
GLSL Problems on Radeon cards
Hi, me and my friend have come across a very strange problem. It seems that, for us anyway, GLSL cannot utilize simple variables under Radeon cards (9800 and x1650 confirmed). If we set a local variable X to, say 1, reading it on the next line results in a 0;
For example:
This code allways displays the diffuse color for LIGHT0. If we, however, change the X to a 1 to directly access LIGHT1 then it works.
Could this be a version or a driver problem? Or is GLSL poorly supported on Radeon cards? Any help would be greatly appreciated.
Thnx /Mekanikles
EDIT: Confirmed that it works on Nvidia cards.
[Edited by - Mekanikles on February 22, 2008 4:49:33 AM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement