Documentation

Unity Engine

Unity Engine

Shader Import Settings window reference

View and edit properties and settings for a prebuilt shader or a custom shader.
Read time 3 minutesLast updated 20 days ago

View and edit properties and settings for a shader.

ShaderLab shader properties

The following properties are available only for ShaderLab shaders.

Property

Description

Default MapsDisplays the textures that appear as material properties.
NonModifiable MapsDisplays the textures that have the
[NonModifiableTextureData]
attribute in the shader. These textures don't appear as material properties.

Shader graph properties

The following properties are available only for shader graphs.

Property

Description

Open Shader EditorOpens the Shader Graph window so you can edit the shader graph.
View Generated ShaderOpens your text editor with the ShaderLab shader code that Shader Graph generates.
Copy ShaderCopies the ShaderLab shader code that Shader Graph generates to the clipboard.

Imported object

Property

Description

Surface ShaderOpens your text editor with the shader Unity generates, if the shader is a surface shader.
Fixed FunctionOpens your text editor with the shader Unity generates, if the shader is a fixed function shader.
Preprocess onlySets Compile and show code to generate only the preprocessed code, instead of the final code. For more information, refer to Shader compilation.
Strip #line directivesRemoves
#line
statements that display how the preprocessed code maps to the original ShaderLab and HLSL code. This property is available only if you enable Preprocess only.
Compiled codeSelect Compile and show code to open your text editor with the shader code Unity compiles. Use the dropdown to select which graphics APIs and platforms Unity compiles the code for. For more information, refer to Compiled code dropdown.

This property is only available for code shaders. For shader graphs, select View Generated Shader.
Cast shadowsDisplays whether geometry casts shadows when it uses this shader.
Render queueDisplays which render queue Unity uses for geometry that uses this shader. For more information, refer to Set the render pipeline and render order for a shader.
LODDisplays the shader LOD value of the shader, which Unity uses to prioritize shaders. For more information, refer to Optimize shaders.
Ignore projectorDisplays whether geometry that uses this shader receives effects from projector components.
Disable batchingDisplays whether the shader prevents Unity from applying dynamic batching to geometry that uses the shader. For more information, refer to Batch meshes at runtime.
KeywordsDisplays the Overridable and Not Overridable keywords the shader defines. For more information, refer to shader keywords.
SRP BatcherDisplays whether the shader is compatible with the Scriptable Render Pipeline (SRP) Batcher.
PropertiesDisplays the properties in the
Properties
block of the shader code. For more information, refer to Properties block reference in ShaderLab.

Compiled code dropdown

For more information, refer to Shader compilation.

Property

Description

Current graphics deviceCompiles the shader code for the graphics device on your current machine.
Current build platformCompiles the shader code for the current build platform. For more information, refer to Build profiles
All platformsCompiles the shader code for all platforms and graphics APIs.
CustomCompiles the shader code for the graphics APIs you select. The options are:
  • D3D: Compiles shader code into DirectX Bytecode (DXBC) for DirectX 11 or DirectX 12.
  • GLES3x: Compiles shader code into OpenGL Shading Language (GLSL).
  • Metal: Compiles shader code into Metal Shading Language (MSL).
  • OpenGLCore: Compiles shader code into OpenGL Shading Language (GLSL).
  • Vulkan: Compiles shader code into SPIR-V.
  • WebGPU: Compiles shader code into WebGPU Shading Language (WGSL).
Skip unused shader_featuresStrips shader variants that materials don't use. For more information, refer to Changing how shaders work via branching and keywords.
The bottom of the Compiled code dropdown displays the number of shader variants Unity compiles. Select Show to open your text editor with a list of the shader variants.

Additional resources