If you want to create shaders, in Shader Graph, for use with Custom Render Textures, you need to understand how to access specific texture coordinates and other shader properties.
Shader Graph provides access to local and global texture coordinates via the UV Node:
- Channel 0 (localTexcoord): Provides the local texture coordinates.
- Channel 1 (globalTexcoord): Provides the global texture coordinates.
To access these channels, add a UV node to your Shader Graph and select the appropriate channel.
For shaders that interact with Cubemaps, use the View Direction node to retrieve the direction for the Cubemap sampling . Make sure that the space is set to World Space to get the correct direction vector.
You can access the update zone index via the UV Node as well.
- Channel 2 (PrimitiveID): Provides the Primitive ID. The primitive ID corresponds to the index of the update zone being rendered.