|
|
|
|
|
|
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); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |