Documentation

Unity Engine

Unity Engine

Shader methods in URP

Resources for the library of High-Level Shader Language (HLSL) shader files that contain helper methods.
Read time 1 minuteLast updated 2 months ago

Resources for the library of High-Level Shader Language (HLSL) shader files that contain helper methods.

Page

Description

Import a file from the URP shader libraryUse the
#include
directive in HLSL to import a URP shader file.
Transform positions in a custom URP shaderTransform vertex, fragment, normal and tangent positions between coordinate spaces.
Use the camera in a custom URP shaderGet the position and direction of the camera.
Use lighting in a custom URP shaderGet the lights in a scene, and calculate lighting.
Use indirect lighting in a custom URP shaderUse reflection probes or Adaptive Probe Volumes in a URP shader.
Use shadows in a custom URP shaderGet shadow data from lights in the scene, and calculate shadows.
ShaderLab Pass tags in URP referenceFind the Pass tags URP uses to determine which shader passes to run in different parts of the render pipeline.

Additional resources