Jump to content
  • Advertisement
Sign in to follow this  
akhin

Light precision of SM2 and SM3 & FP16

This topic is 2668 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 ,

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


Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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 ?

Share this post


Link to post
Share on other sites
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.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!