Sign in to follow this  

GLSL Problems on Radeon cards

Recommended Posts

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:
vec4 diffuseLighting(int X) {
	return gl_LightSource[X].diffuse;

void main()
	gl_FragColor = diffuseLighting(1);

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]

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this