Material Layers
How it worksLayerShaders

What is a SurfaceShader

A base material shader that outputs material properties up the chain.

A SurfaceShader is used in a SurfaceMaterial. It has its own setup macros and layer variables. See SurfaceShader reference.

A SurfaceShader is used as a base material only. It can only output its material properties. It can't read properties from the layer below. It can read the data variables of DataMaterials below it. See What is a DataShader.

The LAYER_OUT_* layer variables are used to output the material properties. See the SurfaceShader reference for the full list, or Writing SurfaceShaders for an example.

Assigning to the default outputs such as ALBEDO, ROUGHNESS etc. isn't necessary for the layer to work, but is needed for material previews.

YoutubePatreonDocsAssetsTwitter

©2026 Foyezes