浏览代码

Merge pull request #1392 from Unity-Technologies/sg/move-hd-subshader-to-package

Move HD sub-shader to HD package
/main
GitHub 7 年前
当前提交
ff309c06
共有 19 个文件被更改,包括 23 次插入18 次删除
  1. 3
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/com.unity.render-pipelines.high-definition.Editor.asmdef
  2. 5
      ScriptableRenderPipeline/HDRenderPipeline/sub-package.json
  3. 5
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/ShaderGraph/HDUnlitSubShader.cs
  4. 8
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/ShaderGraph/HDPBRSubShader.cs
  5. 4
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/ShaderGraph/HDSubShaderUtilities.cs
  6. 8
      ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/ShaderGraph.meta
  7. 8
      ShaderGraph/HDPipeline.meta
  8. 0
      /ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/ShaderGraph/HDUnlitPassForward.template.meta
  9. 0
      /ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/ShaderGraph/HDPBRPass.template
  10. 0
      /ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/ShaderGraph/HDPBRPass.template.meta
  11. 0
      /ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/ShaderGraph/HDUnlitPassForward.template
  12. 0
      /ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/ShaderGraph/HDUnlitSubShader.cs.meta
  13. 0
      /ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/ShaderGraph/HDUnlitSubShader.cs
  14. 0
      /ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/ShaderGraph/HDPBRSubShader.cs.meta
  15. 0
      /ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/ShaderGraph/HDSubShaderUtilities.cs.meta
  16. 0
      /ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/ShaderGraph/HDPBRSubShader.cs
  17. 0
      /ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/ShaderGraph/HDSubShaderUtilities.cs

3
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/com.unity.render-pipelines.high-definition.Editor.asmdef


"com.unity.render-pipelines.core.Editor",
"com.unity.render-pipelines.high-definition.Runtime",
"com.unity.postprocessing.Runtime",
"com.unity.postprocessing.Editor"
"com.unity.postprocessing.Editor",
"Unity.ShaderGraph.Editor"
],
"optionalUnityReferences": [],
"includePlatforms": [

5
ScriptableRenderPipeline/HDRenderPipeline/sub-package.json


"description": "HD Render Pipeline for Unity.",
"subDependencies": [
"com.unity.render-pipelines.core"
]
],
"dependencies": {
"com.unity.shadergraph": "0.1.19"
}
}

5
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/ShaderGraph/HDUnlitSubShader.cs


using System.IO;
using System.Linq;
using UnityEditor.Graphing;
using UnityEditor.ShaderGraph;
namespace UnityEditor.ShaderGraph
namespace UnityEditor.Experimental.Rendering.HDPipeline
{
// [Serializable] ??
public class HDUnlitSubShader : IUnlitSubShader

return subShader.GetShaderString(0);
}
}
}
}

8
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/ShaderGraph/HDPBRSubShader.cs


using System.IO;
using System.Linq;
using UnityEditor.Graphing;
using UnityEditor.ShaderGraph;
namespace UnityEditor.ShaderGraph
namespace UnityEditor.Experimental.Rendering.HDPipeline
{
public class HDPBRSubShader : IPBRSubShader
{

private static bool GenerateShaderPass(PBRMasterNode masterNode, Pass pass, GenerationMode mode, SurfaceMaterialOptions materialOptions, ShaderGenerator result)
{
var templateLocation = ShaderGenerator.GetTemplatePath(pass.TemplateName);
var templateLocation = Path.Combine(Path.Combine(Path.Combine(HDEditorUtils.GetHDRenderPipelinePath(), "Editor"), "ShaderGraph"), pass.TemplateName);
if (!File.Exists(templateLocation))
{
// TODO: produce error here

return subShader.GetShaderString(0);
}
}
}
}

4
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/ShaderGraph/HDSubShaderUtilities.cs


using UnityEngine; // Vector3,4
using UnityEditor.ShaderGraph;
namespace UnityEditor.ShaderGraph
namespace UnityEditor.Experimental.Rendering.HDPipeline
{
public static class HDRPShaderStructs
{

return materialOptions;
}
}
}
}

8
ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/ShaderGraph.meta


fileFormatVersion: 2
guid: 806223183a5502b498e98a2d11c3bd29
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

8
ShaderGraph/HDPipeline.meta


fileFormatVersion: 2
guid: 621b9da5e0cd5cc449775c0394b63d58
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

/ShaderGraph/com.unity.shadergraph/Editor/Templates/HDUnlitPassForward.template.meta → /ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/ShaderGraph/HDUnlitPassForward.template.meta

/ShaderGraph/com.unity.shadergraph/Editor/Templates/HDPBRPass.template → /ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/ShaderGraph/HDPBRPass.template

/ShaderGraph/com.unity.shadergraph/Editor/Templates/HDPBRPass.template.meta → /ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/ShaderGraph/HDPBRPass.template.meta

/ShaderGraph/com.unity.shadergraph/Editor/Templates/HDUnlitPassForward.template → /ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/ShaderGraph/HDUnlitPassForward.template

/ShaderGraph/HDPipeline/HDUnlitSubShader.cs.meta → /ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/ShaderGraph/HDUnlitSubShader.cs.meta

/ShaderGraph/HDPipeline/HDUnlitSubShader.cs → /ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/ShaderGraph/HDUnlitSubShader.cs

/ShaderGraph/HDPipeline/HDPBRSubShader.cs.meta → /ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/ShaderGraph/HDPBRSubShader.cs.meta

/ShaderGraph/HDPipeline/HDSubShaderUtilities.cs.meta → /ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/ShaderGraph/HDSubShaderUtilities.cs.meta

/ShaderGraph/HDPipeline/HDPBRSubShader.cs → /ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/ShaderGraph/HDPBRSubShader.cs

/ShaderGraph/HDPipeline/HDSubShaderUtilities.cs → /ScriptableRenderPipeline/HDRenderPipeline/HDRP/Editor/ShaderGraph/HDSubShaderUtilities.cs

正在加载...
取消
保存