Skip to content

Shader.ReadGlobal

Name Mandatory Description Default Type
⬅️ Input The input of this shard is ignored. None
Output ➡️ The value of the global variable specified.
Name No The name of global shader variable to read. `` String

This shard reads the value of 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.