现在的位置: 首页 > 综合 > 正文

graphics shaders: discard vs transparency

2018年05月27日 ⁄ 综合 ⁄ 共 387字 ⁄ 字号 评论关闭

One final additional capability in fragment shaders that should be mentioned
is the discard operator. This is used to discard pixels so they will not be
passed to the framebuffer. Note that this is quite different from having the pixels
made transparent by setting their alpha color value to zero. Pixels with zero
alpha still have a depth value and are recorded in the depth buffer, so they

mask any pixel that might lie behind them.

就是是否写depthbuffer了。以前没想过这个问题。

抱歉!评论已关闭.