Jump to content
  • Advertisement
Sign in to follow this  
vonsatan

floating point textures

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

Hoi hoi.... I've recently been fiddling with floating point texture in D3D. I read .... nvidia water demo linky and i've been trying to get the simulation working myself but am running into troubles.... Whenever I render something to the sim texture to start it all off I get a single ripple which turns into a black curtain of death spreading out over the entire texture. After that I can't draw anything else to the texture and the sim doesnt function at all. Are there any quirks with FP textures I should look out for? Any render state that could screw with my range? Very frustrating.

Share this post


Link to post
Share on other sites
Advertisement

Just a guess, but it sounds like your getting floating point errors. With floating point you have to watch out for values such as +/- infinity and NAN (not a number). Dividing by zero is an easy way to generate NAN. The secondary issue to generating those numbers is that they "cascade". By "cascade" I mean that any operation with NAN/infinity generates a NAN/infinity. So if you do a repeat pass across data, or blur/multiply using previous calculations they can cause it to spread.

If you want to test this theory you can clear the buffer after it happens to a known float value and see if it is temporarily fixed.

Share this post


Link to post
Share on other sites
Thanks for the reply..... you are correct, the simulation was blowing out to infinity (resolved when the texture was cleared). The problem stemmed from a slight inconsistency in the texture coordinates between 2 of the buffers in the feedback loop... all fixed now and working nicely :)

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!