Skip to main content
gamedev.net
🔒 Locked

floating point textures

Started by vonsatan Apr 6, 2006 at 4:04 AM 1 replies 1.2k views
Original Post
vonsatan
vonsatan
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.
Blah....
multisample
multisample

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.
vonsatan
vonsatan
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 :)
Blah....

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.