nurbz
07-27-2005, 12:59 PM
Hi guys,
I am writing some shader programs in GLSL on my nVidia 6600 using the latest nVidia drivers and the headers provided in the latest nVidia SDK (IDE = MS VS 7.0, aka 2002).
I encountered a very annoying problem in the pixel shader: I cannot obtain the location of some of the uniform variables defined in this shader (GetUniformLocationARB return -1), although I double-checked the names everywhere, and they do match. On the other hand, some other very similar variables work just fine?! It seems to affect mostly the variables declared as "uniform float", although I am not so sure about that.
I am thinking that maybe there is a limit to the amount of global variables that can be instanciated in a pixel shader, and my problem comes from the fact that I reached this limit, as I have a fair amount of variables, arrays and structures declared. Is such a problem possible?
Otherwise, would some seasoned GLSL programmers be kind enough to indicate me some ideas explaining typical reasons for such a failure?
Many thanks
Alexis
I am writing some shader programs in GLSL on my nVidia 6600 using the latest nVidia drivers and the headers provided in the latest nVidia SDK (IDE = MS VS 7.0, aka 2002).
I encountered a very annoying problem in the pixel shader: I cannot obtain the location of some of the uniform variables defined in this shader (GetUniformLocationARB return -1), although I double-checked the names everywhere, and they do match. On the other hand, some other very similar variables work just fine?! It seems to affect mostly the variables declared as "uniform float", although I am not so sure about that.
I am thinking that maybe there is a limit to the amount of global variables that can be instanciated in a pixel shader, and my problem comes from the fact that I reached this limit, as I have a fair amount of variables, arrays and structures declared. Is such a problem possible?
Otherwise, would some seasoned GLSL programmers be kind enough to indicate me some ideas explaining typical reasons for such a failure?
Many thanks
Alexis