Light precision of SM2 and SM3 & FP16

Started by
2 comments, last by MJP 13 years, 1 month ago
Hi ,

Based on http://en.wikipedia.org/wiki/High-dynamic-range_rendering#Development_of_HDRR_through_DirectX
In SM2 how can I use 24 bits for light precision and in SM3 how can I use min 32 bits light precision ?
When I compile my shader with specified shader model , does it make that happen or
is there anything I need to do in my HLSL code ?

Also based on same article , what actually is FP16 blending ?


thanks in advance


Advertisement
Those numbers were just the minimum required precision that GPU's shaders had to operate at in order to be considered SM2.0 or SM3.0-capable. Any SM3.0-capable GPU will have 32-bit FP ALU's, and will executate a shader compiled at any profile in 32-bit precision. The only GPU's to use 24-bit precision were ATI's 9-series and X-series which were SM2.0 GPU's. NVidia's DX9 GPU's (FX-series, 6-series, 7-series) operated at 32-bit precision when using float's, and 16-bit when using the half datatype in shader programs. Any DX10+ capable GPU will just use 32-bit for both float and half.

FP16 blending refers to the ability to blend 16-bit floating point surface formats such as D3DFMT_A16B16G16R16F. Earlier GPU's couldn't do it, which made it difficult to implement HDR due to the use of blending for multipass lighting or transparents.
thanks for your answer , it directly addressed my questions



Besides , regarding HDR implementation, does compiling shaders with either SM2 or SM3 profile bring any difference

regardless the graphics card and ofcourse assuming that graphics card supports at least SM3 ?
SM3.0 supports certain shader assembly instructions that SM2.0 doesn't. For instance, dynamic branching and dynamic looping. So if you compile as ps_3_0 and you use a loop or branch, you may get different code than if you compiled wih ps_2_0.

This topic is closed to new replies.

Advertisement