Jump to content
  • Advertisement
Sign in to follow this  
Prune

Cut short vertex shader computation?

This topic is 3659 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 backface culling enabled and a good deal of computation in the vertex shader after the gl_Position is determined. So for any backwards facing triangles, that computation is a waste. I realize there's no way to know from within the vertex about whether the rest of the vertices will be in a way that will make the triangle face backwards, so I'm wondering about some two-pass method to use? I do most things per vertex because I'm doing fur with 16 to 32 shells and trying to lighten the huge fragment load (actually, I do a pass first with front face culling instead to get the tips of hairs that are beyond the solid object's silhouette to show up, so that actually doubles the vertex processing though the Z-test leaves only little fragment stuff in that pass). If it will help I'll post the code here.

Share this post


Link to post
Share on other sites
Advertisement
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!