Version: 2021.1
LanguageEnglish
  • C#

BlendOp

enumeration

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Blend operation.

The blend operation that is used to combine the pixel shader output with the render target. This can be passed through Material.SetInt() to change the blend operation during runtime.

Note that the logical operations are only supported in Gamma (non-sRGB) colorspace, on DX11.1 hardware running on DirectX 11.1 runtime.

Advanced OpenGL blend operations are supported only on hardware supporting either GL_KHR_blend_equation_advanced or GL_NV_blend_equation_advanced and may require use of GL.RenderTargetBarrier. In addition, the shaders that are used with the advanced blend operations must have a UNITY_REQUIRE_ADVANDED_BLEND(mode) declaration in the shader code where mode is one of the blend operations or "all_equations" for supporting all advanced blend operations (see the KHR_blend_equation_advanced spec for other values).

Properties

AddAdd (s + d).
SubtractSubtract.
ReverseSubtractReverse subtract.
MinMin.
MaxMax.
LogicalClearLogical Clear (0).
LogicalSetLogical SET (1) (D3D11.1 only).
LogicalCopyLogical Copy (s) (D3D11.1 only).
LogicalCopyInvertedLogical inverted Copy (!s) (D3D11.1 only).
LogicalNoopLogical No-op (d) (D3D11.1 only).
LogicalInvertLogical Inverse (!d) (D3D11.1 only).
LogicalAndLogical AND (s & d) (D3D11.1 only).
LogicalNandLogical NAND !(s & d). D3D11.1 only.
LogicalOrLogical OR (s | d) (D3D11.1 only).
LogicalNorLogical NOR !(s | d) (D3D11.1 only).
LogicalXorLogical XOR (s XOR d) (D3D11.1 only).
LogicalEquivalenceLogical Equivalence !(s XOR d) (D3D11.1 only).
LogicalAndReverseLogical reverse AND (s & !d) (D3D11.1 only).
LogicalAndInvertedLogical inverted AND (!s & d) (D3D11.1 only).
LogicalOrReverseLogical reverse OR (s | !d) (D3D11.1 only).
LogicalOrInvertedLogical inverted OR (!s | d) (D3D11.1 only).
MultiplyMultiply (Advanced OpenGL blending).
ScreenScreen (Advanced OpenGL blending).
OverlayOverlay (Advanced OpenGL blending).
DarkenDarken (Advanced OpenGL blending).
LightenLighten (Advanced OpenGL blending).
ColorDodgeColor dodge (Advanced OpenGL blending).
ColorBurnColor burn (Advanced OpenGL blending).
HardLightHard light (Advanced OpenGL blending).
SoftLightSoft light (Advanced OpenGL blending).
DifferenceDifference (Advanced OpenGL blending).
ExclusionExclusion (Advanced OpenGL blending).
HSLHueHSL Hue (Advanced OpenGL blending).
HSLSaturationHSL saturation (Advanced OpenGL blending).
HSLColorHSL color (Advanced OpenGL blending).
HSLLuminosityHSL luminosity (Advanced OpenGL blending).
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961