docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Shader methods in URP

    The Universal Render Pipeline (URP) has a library of High-Level Shader Language (HLSL) shader files that contain helper methods. You can import these files into your custom shader files and use the helper methods.

    Page Description
    Import a file from the URP shader library Use the #include directive in HLSL to import a URP shader file.
    Transform positions in a custom URP shader Transform vertex, fragment, normal and tangent positions between coordinate spaces.
    Use the camera in a custom URP shader Get the position and direction of the camera.
    Use lighting in a custom URP shader Get the lights in a scene, and calculate lighting.
    Use shadows in a custom URP shader Get shadow data from lights in the scene, and calculate shadows.

    Additional resources

    • Writing custom shaders
    • Upgrade custom shaders for URP compatibility
    • HLSL in Unity
    • Shader methods in Scriptable Render Pipeline (SRP) Core
    In This Article
    • Additional resources
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)