Legacy Documentation: Version 5.6 (Go to current version)
LanguageEnglish
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

BlendMode

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 mode for controlling the blending.

The blend mode is set separately for source and destination, and it controls the blend factor of each component going into the blend equation. It is also possible to set the blend mode for color and alpha components separately. Note: the blend modes are ignored if logical blend operations or advanced OpenGL blend operations are in use.

Variables

ZeroBlend factor is (0, 0, 0, 0).
OneBlend factor is (1, 1, 1, 1).
DstColorBlend factor is (Rd, Gd, Bd, Ad).
SrcColorBlend factor is (Rs, Gs, Bs, As).
OneMinusDstColorBlend factor is (1 - Rd, 1 - Gd, 1 - Bd, 1 - Ad).
SrcAlphaBlend factor is (As, As, As, As).
OneMinusSrcColorBlend factor is (1 - Rs, 1 - Gs, 1 - Bs, 1 - As).
DstAlphaBlend factor is (Ad, Ad, Ad, Ad).
OneMinusDstAlphaBlend factor is (1 - Ad, 1 - Ad, 1 - Ad, 1 - Ad).
SrcAlphaSaturateBlend factor is (f, f, f, 1); where f = min(As, 1 - Ad).
OneMinusSrcAlphaBlend factor is (1 - As, 1 - As, 1 - As, 1 - As).
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961