Unity Custom SRP

发布时间 2023-08-20 21:43:55作者: ETHERovo

Custom Render Pipeline

Project Setup

我们需要在线性空间计算光照,所以设置为Linear。

Pipeline Asset

Unity默认使用默认渲染管线,而在这里,我们通过Pipeline Asset来管理自定义管线。进一步的,我们将资产的文件格式写成默认渲染管线的路径格式。

默认的Csharp文件是游戏逻辑的文件格式,我们把类实现部分删掉,并且引入命名空间UnityEngine.Renderring

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class CustomRenderPipelineAsset : MonoBehaviour
{
    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        
    }
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Rendering;