Jump to content
  • Advertisement
Sign in to follow this  
laeuchli

Precision of Vertex Interpolators?

This topic is 3814 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

Dear All, I'm currently placeing some values in a Texture Coord that I use in my pixel shader to decide if I should discard a pixel or not. Basicly I have if(IN.Tex5.x<0) discard; This works, but I'm getting some precision problems. Is this likely due to the percision of the interpolators, or due the comparision hardware? If its the former, does anyone thing that placing the values into a high res floating point texture, and comparing against that would give me higher percision? If not, does anyone have other ideas, or am I just out of luck here? Regards Jesse

Share this post


Link to post
Share on other sites
Advertisement
What kind of precision problems?

Instead of a hard rejection limit at zero, you might try a gradual fade towards an epsilon value. So instead of rejecting at less than 0, maybe do a linear fade with alpha-blending from 0 to -0.0001 (or some other epsilon), and then reject past there. That way you'll at least soften the edges. Soft particles use a similar technique.

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!