![]() ![]() This example code demonstrates the syntax for using this command in a SubShader block. The rest of the code that defines the Pass goes here. Enable regular alpha blending for this Pass The rest of the code that defines the SubShader goes here. Here is the syntax for the most common blend types: Blend SrcAlpha OneMinusSrcAlpha // Traditional transparencyīlend One OneMinusSrcAlpha // Premultiplied transparencyīlend OneMinusDstColor One // Soft additiveīlend DstColor SrcColor // 2x multiplicativeĮxamples Shader "Examples/CommandExample" The GPU multiplies the value of this input by (1 - destination alpha). The GPU multiplies the value of this input by (1 - destination color). The GPU multiplies the value of this input by (1 - source alpha). The GPU multiplies the value of this input by (1 - source color). The GPU multiplies the value of this input by the frame buffer source alpha value. The GPU multiplies the value of this input by the frame buffer source color value. The GPU multiplies the value of this input by the minimum value of source alpha and (1 - destination alpha) The GPU multiplies the value of this input by the source alpha value. The GPU multiplies the value of this input by the source color value. Use this to remove either the source or the destination values. Use this to use the value of the source or the destination color. Separate RGB and alpha blending is not compatible with advanced OpenGL blending operations.Any signature that specifies a render target requires OpenGL 4.0+, GL_ARB_draw_buffers_blend, or OpenGL ES 3.2.(2)Īs above, but for a given render target. Sets separate blend factors for RGB and alpha values. Sets blend factors for RGBA values.Įnables blending the default render target. ![]() (1)Įnables blending for the default render target. This is the default value.Īs above, but for a given render target.
0 Comments
Leave a Reply. |