HLSL Support for Doubles,
Members - Reputation: 352
Posted 24 November 2012 - 08:21 AM
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:
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.