HI,
Just out of curiosity I tried it with my
Nvidia 7800 and got these errors?
cannot change Uniform type
cannot change Uniform type
cannot change Uniform type
cannot change Uniform type
cannot change Uniform type
glLinkProgram "" FAILED
Program "" infolog:
Fragment info
-------------
<stdlib>(3044) : error C5043:
profile requires index _expression_ to be compile-ti
me constant
I have not followed the thread very well,
so its probably something you are aware of.
Regards
Martin.
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Edmond Gheury
Sent: 21 May 2006 02:38
To: osg
users
Subject: Re: [osg-users] GLSL
uniform arrays v. GPU drivers
Hi,
I have exactly the same problem. IMO, it's not the uniform arrays themselves
thar are not supported. It's the indirect array indexing feature, like
Color2[i], which is not supported in HW and therefor falling back to software
mode. However, fixed value indexing works on my X600 (like Color2[1]). I sent a
mail to [EMAIL PROTECTED] with a test app to
learn more about this limitation, but they replied me that it should work on my
GPU, which is still not the case on mine with the latest drivers. Such a
missing feature is very surprising as it's commonly used when doing vertex
skinning for instance...
A unpratical solution for small arrays would be to make a conditional statement
to select an array element:
vec3 color;
if (i == 0) color = mix(Color2[0], Color1, colorSelect) * LightIntensity;
else color = mix(Color2[1], Color1, colorSelect) * LightIntensity;
Best regards,
Edmond