首页 > 代码库 > Blending

Blending

Blending

  Blending is used to make transparent objects.

  

  When graphics are rendered, after all shaders have executed and all textures have been applied, the pixels are written to the screen. How they are combined with what is already there is controlled by the Blend command.

[Syntax]

  

[Blend Operations]

  

[Blend factors]

  

[常用混合类型]

  

[Examples]

1、Here is a small example shader that adds a texture to whatever is on the screen already:

Shader "Simple Additive" {    Properties {        _MainTex ("Texture to blend", 2D) = "black" {}    }    SubShader {        Tags { "Queue" = "Transparent" }        Pass {            Blend One One            SetTexture [_MainTex] { combine texture }        }    }}
View Code

参考:file://localhost/Applications/Unity/Unity.app/Contents/Documentation/Documentation/Components/SL-Blend.html