Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


HLSL Support for Doubles


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 BenS1   Members   -  Reputation: 337

Like
0Likes
Like

Posted 24 November 2012 - 08:21 AM

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

Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS