Help wanted: how to access Global Shader properties within a CustomFunction node in ShaderGraph,How to access Global Shader properties within a CustomFunction node in ShaderGraph

You are able to set Global shader properties with Shader.SetGlobalFloat, for instance. You are also able to access those variables from top-level shader graphs and pass them down into subgraphs. For simplicity I’d like to be able to access them from subgraphs without passing them in. I was playing with writing hlsl in a Custom Function node, but I’m unable to find a way to access a global property from this context. Any help would be appreciated!

Hi, there is my example.

Texture3D<float4> _AO_Texture;
float3 _AO_Start;
float3 _AO_Size;

void MainGetAO_float(out Texture3D<float4> AO_Texture, out float3 AO_Start, out float3 AO_Size)
{
   AO_Texture = _AO_Texture;
   AO_Start = _AO_Start;
   AO_Size = _AO_Size;
}