[转]shader中的half float

1 I think Cg uses a half float (fp16) data type. Also while loading the fp16 texture data into the graphics card, I can save some PCI-Ex bus bandwidth when compared to loading a fp32 texture data. Bus bandwidth and data transfer time is very critical for my application. Also if I use fp16 texture instead of fp32 texture I save a ton of memory on the GPU which is scarce.

2 It depends whether you're meaning storage or processing as half-precision.
Storage, as Krohm mentioned, is dependent on some device caps but most recent hardware will be okay for vertex/texture elements in FP16 format.

Processing is much less clear - older hardware implemented SM2 in half/24/single precision depending on the architecture. Both SM3 and SM4 mandate that all internal calculations are performed with FP32 precision - so even if you read from and then write to FP16 storage using SM4 the intermediary computations are all done at FP32.

 

link:

1 http://www.gamedev.net/community/forums/topic.asp?topic_id=327971

2 http://www.gamedev.net/community/forums/topic.asp?topic_id=481660

(即节省内存和带宽,至于运行速度现已无差别)

转载于:https://www.cnblogs.com/ActionFG/archive/2012/09/09/2677734.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值