首页 > 其他 > 详细

Stencil

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

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

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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!