浏览代码

Remap graph handling for textures.

/main
Tim Cooper 7 年前
当前提交
97674d1f
共有 3 个文件被更改,包括 14 次插入1 次删除
  1. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Graphs/TextureShaderProperty.cs
  2. 1
      MaterialGraphProject/Assets/UnityShaderEditor/Runtime/LightweightPipeline/AbstractLightweightMasterNode.cs
  3. 10
      MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Remapper/MasterRemapGraph.cs

4
MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Graphs/TextureShaderProperty.cs


return "UNITY_DECLARE_TEX2D(" + referenceName + ");";
}
public override string GetInlinePropertyDeclarationString()
{
return "UNITY_DECLARE_TEX2D_NOSAMPLER(" + referenceName + ");";
}
public override PreviewProperty GetPreviewMaterialProperty()
{

1
MaterialGraphProject/Assets/UnityShaderEditor/Runtime/LightweightPipeline/AbstractLightweightMasterNode.cs


surfaceOutputRemap.Deindent();
surfaceOutputRemap.AddShaderChunk("}", false);
}
}
public override IEnumerable<string> GetSubshader(ShaderGraphRequirements graphRequirements, MasterRemapGraph remapper)

10
MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Remapper/MasterRemapGraph.cs


[Serializable]
public class MasterRemapGraph : AbstractSubGraph
{
public override void AddShaderProperty(IShaderProperty property)
{
if (property.GetType() == typeof(TextureShaderProperty))
{
Debug.LogWarning("Can not add Texture properties to remap graphs");
return;
}
base.AddShaderProperty(property);
}
public override void AddNode(INode node)
{

正在加载...
取消
保存