Skip to content

Shader.WriteGlobal

Name Mandatory Description Default Type
⬅️ Input The value to set to the global shader variable specified. Any
Output ➡️ The shard outputs none, but the value is set to the global shader variable specified. None
Name No The name of global variable to set the input value to. `` String

This shard sets the value passed as input to the global shader variable specified in the Name parameter.

Details

A global shader variable is a variable that is available for use across all entry points at the same stage. This means that when Shader.WriteGlobal creates a global variable in the Vertex stage, it is now available to all entry points after the entry point that created it. It is however not available in the Fragment stage. Similarly, global shader variables created in the Fragment stage are not available in the Vertex stage.