The blend mode used for rendering. Possible values:
BlendMode | Value | Expression |
---|---|---|
Normal | 0 | SrcAlpha, OneMinusSrcAlpha |
MultiplyLegacy [DEPRECATED] | 1 | DstColor, OneMinusSrcAlpha |
AddLegacy [DEPRECATED] | 2 | One, One |
Screen | 3 | One, OneMinusSrcColor |
PremultipliedAlpha | 4 | One, OneMinusSrcAlpha |
AlphaToCoverage | 5 | Blend Disabled |
Disabled | 6 | Blend Disabled |
Add | 7 | SrcAlpha, One |
AlphaTest | 8 | Blend Disabled |
ColoredGlass | 9 | Blend Disabled |
Multiply | 10 | DstColor, Zero |
Min | 11 | One, One |
Max | 12 | One, One |
// Sets the blend mode of the main pass for a material to Screen
//@input Asset.Material material
script.material.mainPass.blendMode = 3;
Controls the masking of color channels with a vec4b representing each channel with a boolean.
The cull mode used for rendering.
Enables depth-sorting.
Enables writing pixels to the depth buffer.
Set max corner of aabb. It only applys when user selects FrustumCullMode.UserDefinedAABB
Set min corner of aabb. It only applys when user selects FrustumCullMode.UserDefinedAABB
Mode for setting frustum culling on Pass
Extend render object's aabb to (1 + value). Only applys when user select FrustumCullMode.Extend
Number of times the pass will be rendered. Useful with the Instance ID node in Material Editor.
Line width used for rendering.
The name of the Pass.
Changes the position that each polygon gets drawn.
Readonly
samplersReturns texture samplers used by this pass to set filtering and wrap modes.
The stencil test state for Pass.
Whether the material renders on both sides of a mesh face.
Returns the name of this object's type.
Returns true if the object matches or derives from the passed in type.
Returns true if this object is the same as other
. Useful for checking if two references point to the same thing.
Controls how a mesh will get rendered. Each Pass acts as an interface for the shader it's associated with. Any properties on a Pass's shader will automatically become properties on that Pass. For example, if the shader defines a variable named
baseColor
, a script would be able to access that property asmaterial.mainPass.baseColor
.Example