浏览代码

Export proper shader paths for HD / LW

/main
Tim Cooper 7 年前
当前提交
ff543fc6
共有 3 个文件被更改,包括 48 次插入3 次删除
  1. 15
      ScriptableRenderPipeline/LightweightPipeline/LWRP/Editor/LightweightShaderIncludePaths.cs
  2. 25
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/HDShaderIncludePaths.cs
  3. 11
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/HDShaderIncludePaths.cs.meta

15
ScriptableRenderPipeline/LightweightPipeline/LWRP/Editor/LightweightShaderIncludePaths.cs


using System.IO;
using System.Linq;
using UnityEngine;
namespace UnityEditor.Experimental.Rendering.LightweightPipeline
{

public static string[] GetPaths()
{
return new[]
var srpMarker = Directory.GetFiles(Application.dataPath, "SRPMARKER", SearchOption.AllDirectories).FirstOrDefault();
var paths = new string[srpMarker == null ? 1 : 2];
var index = 0;
if (srpMarker != null)
Path.GetFullPath("Packages/com.unity.render-pipelines.lightweight/LWRP/Shaders"),
};
var rootPath = Directory.GetParent(srpMarker).ToString();
paths[index] = Path.Combine(rootPath, "ScriptableRenderPipeline/LightweightPipeline");
index++;
}
paths[index] = Path.GetFullPath("Packages/com.unity.render-pipelines.lightweight");
return paths;
}
}
}

25
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/HDShaderIncludePaths.cs


using System.IO;
using System.Linq;
using UnityEngine;
namespace UnityEditor.Experimental.Rendering.LightweightPipeline
{
static class HDIncludePaths
{
[ShaderIncludePath]
public static string[] GetPaths()
{
var srpMarker = Directory.GetFiles(Application.dataPath, "SRPMARKER", SearchOption.AllDirectories).FirstOrDefault();
var paths = new string[srpMarker == null ? 1 : 2];
var index = 0;
if (srpMarker != null)
{
var rootPath = Directory.GetParent(srpMarker).ToString();
paths[index] = Path.Combine(rootPath, "ScriptableRenderPipeline/HDRenderPipeline");
index++;
}
paths[index] = Path.GetFullPath("Packages/com.unity.render-pipelines.high-definition");
return paths;
}
}
}

11
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/HDShaderIncludePaths.cs.meta


fileFormatVersion: 2
guid: 84952d5f39a1d9241bc9c777300806e8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存