混合运算。
用于组合像素着色器和渲染目标的混合运算。在运行时可以通过 Material.SetInt() 传递,从而更改混合运算。
请注意,只有在 Gamma(非 sRGB)颜色空间中,在 DirectX 11.1 运行时上运行的 DX11.1 硬件上才支持逻辑运算符。
只有在支持 GL_KHR_blend_equation_advanced 或 GL_NV_blend_equation_advanced 的硬件上才支持高级 OpenGL 混合运算,并且可能需要使用 GL.RenderTargetBarrier。此外,用于高级混合运算的着色器在着色器代码中必须有 UNITY_REQUIRE_ADVANDED_BLEND(mode) 声明,其中,mode 是一种混合运算或“all_equations”,以便支持所有高级混合运算(有关其他值,请参阅 KHR_blend_equation_advanced 规范)。
Add | Add (s + d). |
Subtract | Subtract。 |
ReverseSubtract | 逆向减。 |
Min | Min。 |
Max | Max。 |
LogicalClear | 逻辑 Clear (0)。 |
LogicalSet | 逻辑 SET (1)(仅限 D3D11.1)。 |
LogicalCopy | 逻辑 Copy (s)(仅限 D3D11.1)。 |
LogicalCopyInverted | 逻辑反转 Copy (!s)(仅限 D3D11.1)。 |
LogicalNoop | 逻辑 No-op (d)(仅限 D3D11.1)。 |
LogicalInvert | 逻辑 Inverse (!d)(仅限 D3D11.1)。 |
LogicalAnd | 逻辑 AND (s & d)(仅限 D3D11.1)。 |
LogicalNand | 逻辑 NAND !(s & d)。仅限 D3D11.1。 |
LogicalOr | 逻辑 OR (s | d)(仅限 D3D11.1)。 |
LogicalNor | 逻辑 NOR !(s | d)(仅限 D3D11.1)。 |
LogicalXor | 逻辑 XOR (s XOR d)(仅限 D3D11.1)。 |
LogicalEquivalence | 逻辑 Equivalence !(s XOR d)(仅限 D3D11.1)。 |
LogicalAndReverse | 逻辑逆 AND (s & !d)(仅限 D3D11.1)。 |
LogicalAndInverted | 逻辑反转 AND (!s & d)(仅限 D3D11.1)。 |
LogicalOrReverse | 逻辑逆 OR (s | !d)(仅限 D3D11.1)。 |
LogicalOrInverted | 逻辑反转 OR (!s | d)(仅限 D3D11.1)。 |
Multiply | Multiply(高级 OpenGL 混合)。 |
Screen | Screen(高级 OpenGL 混合)。 |
Overlay | Overlay(高级 OpenGL 混合)。 |
Darken | Darken(高级 OpenGL 混合)。 |
Lighten | Lighten(高级 OpenGL 混合)。 |
ColorDodge | Color dodge(高级 OpenGL 混合)。 |
ColorBurn | Color burn(高级 OpenGL 混合)。 |
HardLight | Hard light(高级 OpenGL 混合)。 |
SoftLight | Soft light(高级 OpenGL 混合)。 |
Difference | Difference(高级 OpenGL 混合)。 |
Exclusion | Exclusion(高级 OpenGL 混合)。 |
HSLHue | HSL Hue(高级 OpenGL 混合)。 |
HSLSaturation | HSL saturation(高级 OpenGL 混合)。 |
HSLColor | HSL color(高级 OpenGL 混合)。 |
HSLLuminosity | HSL luminosity(高级 OpenGL 混合)。 |
Did you find this page useful? Please give it a rating:
Thanks for rating this page!
What kind of problem would you like to report?
Thanks for letting us know! This page has been marked for review based on your feedback.
If you have time, you can provide more information to help us fix the problem faster.
Provide more information
You've told us this page needs code samples. If you'd like to help us further, you could provide a code sample, or tell us about what kind of code sample you'd like to see:
You've told us there are code samples on this page which don't work. If you know how to fix it, or have something better we could use instead, please let us know:
You've told us there is information missing from this page. Please tell us more about what's missing:
You've told us there is incorrect information on this page. If you know what we should change to make it correct, please tell us:
You've told us this page has unclear or confusing information. Please tell us more about what you found unclear or confusing, or let us know how we could make it clearer:
You've told us there is a spelling or grammar error on this page. Please tell us what's wrong:
You've told us this page has a problem. Please tell us more about what's wrong:
Thank you for helping to make the Unity documentation better!
Your feedback has been submitted as a ticket for our documentation team to review.
We are not able to reply to every ticket submitted.