Skip to main content
Version: 5.x

Nodes > Main > Shader

Shader

The final outputs of the vertex and fragment shaders.

Inputs

NameTypeDescription
Color (Pixel)colorFinal color output of the fragment shader
DepthfloatThe depth value that should be output by the fragment shader
World Position (Vertex)floatFinal vertex world position to output from the vertex shader
Prev Frame World Position (Vertex)floatMust be set to the value that the world position of this vertex had on the previous frame of rendering. This input is only enabled when the Prev Frame World Pos Override property of the Shader node is enabled. See the documentation for the Prev Frame World Pos Override property for more info.
World Normal (Vertex)floatFinal normal vector to output from the vertex shader
World Tangent (Vertex)floatFinal tangent vector to output from the vertex shader
Point Size (Vertex)floatIn Gaussian Splatting mode: Override the size (radius) of the splat, specified in pixels.
Scale (Vertex)floatIn Gaussian Splatting mode: Override the Scale attribute of the splat (Object Space)
Rotation (Vertex)floatIn Gaussian Splatting mode: Override the Rotation attribute of the splat (Object Space)

Properties

NameTypeDescription
TypedropdownIf set to post effect, it will skip all world vertex positioning, useful for making screen space shader. If set to Hair, this material must be assigned to a Hair Mesh Visual to be rendered properly. Transforms vertices using data from the Hair Mesh Visual component.
DepthboolWhen enabled, allows custom depth values to be set.
Depth ModedropdownDepth Mode
Prev Frame World Pos OverrideboolWhen enabled, the Prev Frame World Position (Vertex) input is exposed. This is only needed if your effects need correct motion vectors, such as TAA, and your material is doing non-standard vertex or UV animation, which can cause colors to smear when the automatic motion vector calculation is incorrect. In these cases you need to explicitly calculate the previous frame position and pass it to the shader, so that correct motion vectors can be calculated (ie: current frame position - previous frame position)
Motion Vector PassdropdownMotion Vector Pass
Allow Negative ColorsboolIf enabled, negative values will be allowed in the final color output
Was this page helpful?
Yes
No