赞
踩
Unity官网Blend API介绍 https://docs.unity3d.com/Manual/SL-Blend.html
Blend透明渲染这块有点头疼。知道参数,还不是很明白计算公式。后续学会的话,来更新文章
SrcColor 要渲染得颜色
SrcAplha 要渲染的透明度
DstColor 已经再屏幕上显示的颜色
DstAlpha 已经再屏幕上显示得颜色透明度
One MinusSrcColor 1减去要渲染的颜色
OneMinusSrcAlpha 1减去要渲染的透明度
One MinusDstColor 1减去屏幕上显示的颜色
OneMinusDstAlpha 1减去屏幕上显示的颜色的透明度
解释:
Blend SrcAlpha OneMinusSrcAlpha
要渲染的颜色 * 要渲染的颜色透明度 + (1-要渲染的颜色透明度)*Gubffer的像素
常用命令
Blend SrcAlpha OneMinusSrcAlpha // Traditional transparency
Blend One OneMinusSrcAlpha // Premultiplied transparency
Blend One One // Additive
Blend OneMinusDstColor One // Soft Additive
Blend DstColor Zero // Multiplicative
Blend DstColor SrcColor // 2x Multiplicative
BlendOp 当这个指令存在,则Blend 指令失效
Add | Add source and destination together. |
Sub | Subtract destination from source. |
RevSub | Subtract source from destination. |
Min | Use the smaller of source and destination. |
Max | Use the larger of source and destination. |
LogicalClear | Logical operation: Clear (0) DX11.1 only. |
LogicalSet | Logical operation: Set (1) DX11.1 only. |
LogicalCopy | Logical operation: Copy (s) DX11.1 only. |
LogicalCopyInverted | Logical operation: Copy inverted (!s) DX11.1 only. |
LogicalNoop | Logical operation: Noop (d) DX11.1 only. |
LogicalInvert | Logical operation: Invert (!d) DX11.1 only. |
LogicalAnd | Logical operation: And (s & d) DX11.1 only. |
LogicalNand | Logical operation: Nand !(s & d) DX11.1 only. |
LogicalOr | Logical operation: Or (s | d) DX11.1 only. |
LogicalNor | Logical operation: Nor !(s | d) DX11.1 only. |
LogicalXor | Logical operation: Xor (s ^ d) DX11.1 only. |
LogicalEquiv | Logical operation: Equivalence !(s ^ d) DX11.1 only. |
LogicalAndReverse | Logical operation: Reverse And (s & !d) DX11.1 only. |
LogicalAndInverted | Logical operation: Inverted And (!s & d) DX11.1 only. |
LogicalOrReverse | Logical operation: Reverse Or (s | !d) DX11.1 only. |
LogicalOrInverted | Logical operation: Inverted Or (!s | d) DX11.1 only. |
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。