Jump to content
  • Advertisement
Sign in to follow this  
burana

GLSL and variable loop count on Nvidia

This topic is 4967 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a problem with GLSL vertex program loops. They work fine when the loop count is constant - I guess the compiler unrolls them at compile-time. But I can't use uniforms or attribute variables as the loop count, it just ends up with a compile error. Any ideas how to get this to work? What I'm trying to do is skin&bone animation with a varying amount of bones per vertex. I have geforce 5700 ultra with driver version 6.1.7.7 Also, any info and pointers about known bugs with current GLSL implementations would be very welcome.

Share this post


Link to post
Share on other sites
Advertisement
You can do a loop where count is a uniform in vertex shader, but not in fragment shader. You might want to update drivers first (66.93 are latest official). What kind of error are you geting form compiler. Your program might break the instruction count limit.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
In vertex skinning it is not a good idea to use uniforms when weight amount varies per vertex not per object. If attribute variables could be used to define loop count then there would be some sense. Too bad that nVidia does not have full support for glsl. And their compiler itself has major bugs in it which makes shader development really painful.

Share this post


Link to post
Share on other sites
is there any way to use loops in ARB vertex programs? and also, is there any way to access the number of active... say... lights? that would be a great if it was possible...
thanks
-Dan

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!