Shader 学习笔记 ---Z-Buffering or W-Buffering

Z-Buffering  or  W-Buffering

    z-buffering 和 w-buffering都表示深度值。几乎所有的3-D加速卡都支持z-buffering,这样就使得z-buffers成为现在最常用的深度缓冲类型。

    The Z-Buffering

    在 z-buffering中,the depth is stored as 1/z.using 1/z has a negative consequence when the values in the depth buffer are not linear. 这就是说在depth buffer中的值不能随着真实的深度值变化,but follow more of an exponential curve.

  The W-Buffering
        W-Bufferin保存投影变化后的w value,这时的W是线性的。WDepth = Depth / Far_Z_Clip.

        w深度缓冲比z-buffer能更均匀地在远近剪切面之间进行分配。使用它的最大好处就是远近剪切面的距离比不再是关键因素。这样就允许程序使用更大的距离范围,同时仍能保持深度缓冲与观察位置间的精确联系。w-buffer也不是完美的,有时也会使近处物体的隐藏表面产生失真。w-buffer的另一个缺点是不能得到硬件的广泛支持。

 

Using Alpha Channel

     在Render Target中有alpha channel,平常是没有作用的,所以 the blurring factors can be put in this channel and used in the final DOF pass to determine how much of the blurred render target to apply.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值