码迷,mamicode.com
首页 > 其他好文 > 详细

Stencil

时间:2014-07-26 16:51:21      阅读:267      评论:0      收藏:0      [点我收藏+]

标签:style   blog   http   color   os   strong   io   2014   

Stencil

  The stencil buffer can be used as a general purpose per pixel mask for saving or discarding pixels.

  The stencil buffer is usually an 8 bit integer per pixel. The value can be written to, increment or decremented. Subsequent draw calls can test against the value, to decide if a pixel should be discarded before running the pixel shader.

  Stencil测试在Fragment Shader之前进行。也即光栅化后进行的第一个Test,Stencil-Test过后是ZTest。

[Syntax] bubuko.com,布布扣

  Comp, Pass, Fail and ZFail will be applied to the front-facing geometry, unless Cull Front is specified, in which case it‘s back-facing geometry. You can also explicitly specify the two-sided stencil state by defining CompFront, PassFront, FailFront, ZFailFront (for front-facing geometry), and CompBack, PassBack, FailBack, ZFailBack (for back-facing geometry).

[Comparison Function]

  bubuko.com,布布扣

[Stencil Operation]

  bubuko.com,布布扣

[Deferred rendering path]

  to be continued...

参考:file://localhost/Applications/Unity/Unity.app/Contents/Documentation/Documentation/Components/SL-Stencil.html

Stencil,布布扣,bubuko.com

Stencil

标签:style   blog   http   color   os   strong   io   2014   

原文地址:http://www.cnblogs.com/tekkaman/p/3870103.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!