Jump to content
  • Advertisement
Sign in to follow this  
manur

Floating point issue

This topic is 4268 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 created a volume texture from a set of slices of USHORT values. . The data in these slices had values from 0 to 65535. . I wrote a shader program which can get a particular pixel from the volume texture. . When the value of the pixel exceeds 2048 it does not give the right value. . I came across a site:- http://www.3dcenter.org/artikel/nv40_technik/index3_e.php where they said about a precision problem when the value goes above 2048. . I am using 7800 GTX card. Will my card also have the same problem? . What should I do to regain from this trouble??

Share this post


Link to post
Share on other sites
Advertisement
The only practical solutions are:

1) Convert your textures to 0.0-1.0 range floating point.
2) Scale your values from 0-65535 to 0-2047 range integer.

If you are trying to avoid causing compatibility conflicts with cards that cannot do floating point textures, you should also consider that those cards probably won't be able to render your volumetric scene at usable speeds anyway.

Even the clunkiest and least inexpensive of the 6200 line supports fp16 (to some degree).

For what runs at 10-20fps on my 6800GT only runs at like 2-5fps on my colleague's 6200. When the problem arose that the 6200 doesn't do linear blend on fp16 textures, I thought for a moment about implementing a nearest neighbour blend fallback, but decided against it: it would look like hell, and at 2fps. What's the point? :)

Share this post


Link to post
Share on other sites
I didn't get the sentence convert textures to 0 - 1.0
If I scale the values from 0-65535 to 0-2047 then probably i will get floating point numbers. These numbers when I use for creating textures may again cause loss of precision. Regarding the different cards to be used I am working at it

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!