docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    URP 中的着色器方法

    Universal Render Pipeline (URP) 提供了一套 High-Level Shader Language (HLSL) 着色器文件库,包含了许多辅助方法。你可以将这些文件导入到自定义着色器文件中,并使用其中的辅助方法。

    页面 描述
    从 URP 着色器库导入文件 使用 #include 指令在 HLSL 中导入 URP 着色器文件。
    在自定义 URP 着色器中转换坐标 在不同坐标空间之间转换顶点、片段、法线和切线位置。
    在自定义 URP 着色器中使用相机 获取相机的位置和方向。
    在自定义 URP 着色器中使用光照 获取场景中的光源并计算光照。
    在自定义 URP 着色器中使用阴影 从场景中的光源获取阴影数据,并计算阴影。

    额外资源

    • 编写自定义着色器
    • 将自定义着色器升级为 URP 兼容
    • Unity 中的 HLSL
    • Scriptable Render Pipeline (SRP) Core 中的着色器方法
    In This Article
    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)