Hi All,
I have run in to some trouble with a shader that uses a dynamically updated uniform (updated rarely but it does change). Everything works as expected on all nvidia cards I have tried but I cannot get it to work on an ATI card (FirePro V5700). All systems are running WinXP. I know ATIs OpenGL drivers are terrible, but has anyone come across this problem and has a suggestion on how to fix it? I have made a realy simple shader to replicate the problem: uniform int numActiveLayers; //updated dynamically void main() { vec4 col = texture2D(textures[0], gl_TexCoord[0].st); if(numActiveLayers == 1) { //at first, always set to 1 gl_FragColor = col; } else if(numActiveLayers > 999){ //this condition is never true //} else if(1 > 999) { //if I change to this it all works fine. It only executes this block if I test against the uniform //does nothing but causes the problem, which means it is still executed. //There is no texture in unit 1 so it is fine to fail but it shouldn't execute vec4 layerCol = texture2D(textures[1],gl_TexCoord[0].st); // Even when it is failing because of the above line, the output fragment is not red. gl_FragColor = vec4(1,0,0,1); } } Any ideas would be greatly appreciated as I am completely stuck. Cheers, Brad DISCLAIMER:--------------------------------------------------------------------------- This e-mail transmission and any documents, files and previous e-mail messages attached to it are private and confidential. They may contain proprietary or copyright material or information that is subject to legal professional privilege. They are for the use of the intended recipient only. Any unauthorised viewing, use, disclosure, copying, alteration, storage or distribution of, or reliance on, this message is strictly prohibited. No part may be reproduced, adapted or transmitted without the written permission of the owner. If you have received this transmission in error, or are not an authorised recipient, please immediately notify the sender by return email, delete this message and all copies from your e-mail system, and destroy any printed copies. Receipt by anyone other than the intended recipient should not be deemed a waiver of any privilege or protection. Thales Australia does not warrant or represent that this e-mail or any documents, files and previous e-mail messages attached are error or virus free. --------------------------------------------------------------------------------------
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org