Jump to content
  • Advertisement
Sign in to follow this  
BenS1

HLSL Support for Doubles

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

Hi,

I know that DirectX 11 (Shader Model 5) supports doubles (Although technically optional I believe, but both ATI and NVIDIA quote performance figures for double precision operations, so I guess they both support it.), but how exactly is it supported?

Most HLSL functions seem to only support floats, for example Lerp:
http://msdn.microsoft.com/en-us/library/windows/desktop/bb509618(v=vs.85).aspx

So does this mean that doubles can only be used for basic math and not used in most HLSL functions?

My game world is pretty massive (1 million square miles at the moment) and I'm seeing some strange artifacts on the terrain that I believe are due to floating point precision errors. I've always know that this would happen, but I had been planning to switch to using doubles instead at just take the performance hit, but now I'm not sure how good the support for doubles really is in HLSL.

Failing that I guess I'll have to reread the "Vertex Transform Precision" chapter in "3D Engine Design for Virtual Globes" which provides some more complex solutions to handling massive worlds, but I'd prefer to keep it simpler if possible.

Thanks
Ben

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.

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!