Jump to content
  • Advertisement
Sign in to follow this  
tokaplan

'half' shader data type

This topic is 3983 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 everyone, Seems like using half data type instead of float may save a lot of time on GPUs that support it (over 30% on GeForce 6600, 0% on GeForce 5700). How come every single vertex/pixel shader sample I've ever seen on the net uses float? Why not use half? Does everyone really needs 32-bit precision in vector computations? Thank you

Share this post


Link to post
Share on other sites
Advertisement
The issue of precision is a complex one. By and large you'll only want to bother with it when fine tuning for some platforms as it really doesn't have much benefit in the general case.

Quote:
may save a lot of time on GPUs that support it (over 30% on GeForce 6600, 0% on GeForce 5700)
Where did these values come from?

Off the top of my head, the GeForce 5-series had seperate half and single precision units whereas the GeForce 6,7,8-series were all single precision internally. The D3D9 generation ATI parts were mostly 24bit internal precision until their SM3 and SM4 generation (R500 and R600).

The point being that only the relatively ancient GeForce 5-series has a varying precision pipeline; all other GPU's have a standard precision for all units on the GPU.

As for whether its needed - yes. Full 32bit internal precision is a good thing. However, reading or writing from FP32 is less important - storing the input/output values as FP16 is usually sufficient. The real errors tend to creep in due to truncation/rounding of intermediary values.

hth
Jack

Share this post


Link to post
Share on other sites
Quote:
Original post by jollyjeffers
Where did these values come from?

Well, I just ran my application on these GPUs and took down FPS counter values in both cases ;)

Thanks

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!