Scriptable Render Pipeline 可编程渲染管线

16 篇文章 2 订阅

Scriptable Render Pipeline 可编程渲染管线

  • 概述
    • 可以使用c#脚本定制渲染管线
    • 内置渲染和SRP不兼容
      • shader不共用,因为shader lib不同

Pre-built SRPs

Setting up a Scriptable Render Pipeline

  • Using a pre-built SRP with a new Project
    • 如果不需要定制,使用模板创建新工程
  • Installing the latest SRP into an existing Project
    • 在已有工程里使用SRP
    • 使用Package Manager system下载资源,然后选择安装需要的资源
    • 转换成SRP耗时,手动设置的地方多
  • Configuring and using a pre-built render pipeline 配置使用内置渲染管线
    • 使用内置渲染管线需要创建 Render Pipeline Asset
    • Creating Scriptable Render Pipeline Assets
      • Pipeline Assets中包含设置项,用于控制渲染质量
      • 创建渲染管线实例对象
        • 中间件资源
        • 渲染管线实现
      • 可以为不同平台和不同的测试环境创建不同的Pipline Assets
      • 因为使用不同的光照模型,HDRP和LWRP不兼容
      • Create>Render Pipeline
    • Configuring and using HDRP
      • Edit>Project Settings - Player - Linear Color Space
        • not support gamma lighting
      • 创建Render Pipeline后 在Edit > Project Settings > Graphics
      • 把创建的Pipeline Asset拖上去
      • 在Scriptable Render Pipeline folder之外存储创建的Pipeline Asset,保证HDRP settings和git上可以同步
    • Configuring and using LWRP
      • 类似上面的过程,换个名字
  • Creating a custom SRP
    • clone github上的,然后直接使用
    • 创建新工程或者加到已有的工程
      • 把github的资源放到Assets根目录
      • 切换到兼容当前所用的Unity版本的分支
      • 使用命令"git submodule update --init",为SRP添加子模块
      • 更新Project manifest/dependencies,例如:
        {
          "dependencies": {
              "com.unity.postprocessing": "file:../ScriptableRenderPipeline/com.unity.postprocessing",
            
              "com.unity.render-pipelines.core": "file:../ScriptableRenderPipeline/com.unity.render-pipelines.core",
            
              "com.unity.shadergraph": "file:../ScriptableRenderPipeline/com.unity.shadergraph",
            
              "com.unity.render-pipelines.lightweight": "file:../ScriptableRenderPipeline/com.unity.render-pipelines.lightweight"
            
          }
        }
        
      • 打开unity,可以开始debug和更改了
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值