浏览代码

Fixes for PR

/main
Matt Dean 7 年前
当前提交
10685e95
共有 4 个文件被更改,包括 10 次插入10 次删除
  1. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/Sampler2DShaderProperty.cs
  2. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Scene/ObjectNode.cs
  3. 8
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Scene/SceneDepthNode.cs
  4. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Scene/ScreenNode.cs

4
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/Sampler2DShaderProperty.cs


using System.Text;
using UnityEngine;
namespace UnityEditor.ShaderGraph
/*namespace UnityEditor.ShaderGraph
{
[Serializable]
public class Sampler2DShaderProperty : AbstractShaderProperty<object>

return default(PreviewProperty);
}
}
}
}*/

4
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Scene/ObjectNode.cs


namespace UnityEditor.ShaderGraph
{
[Title("Input", "Scene", "Object")]
public class ObjectNode : AbstractMaterialNode
public sealed class ObjectNode : AbstractMaterialNode
{
const string kOutputSlotName = "Position";
const string kOutputSlot1Name = "Scale";

UpdateNodeAfterDeserialization();
}
public sealed override void UpdateNodeAfterDeserialization()
public override void UpdateNodeAfterDeserialization()
{
AddSlot(new Vector3MaterialSlot(OutputSlotId, kOutputSlotName, kOutputSlotName, SlotType.Output, Vector3.zero));
AddSlot(new Vector3MaterialSlot(OutputSlot1Id, kOutputSlot1Name, kOutputSlot1Name, SlotType.Output, Vector3.zero));

8
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Scene/SceneDepthNode.cs


using UnityEditor.ShaderGraph.Drawing.Controls;
using System.Collections.Generic;
namespace UnityEditor.ShaderGraph
/*namespace UnityEditor.ShaderGraph
{
public enum SceneDepthMode
{

[Title("Input", "Scene", "Scene Depth")]
public class SceneDepthNode : AbstractMaterialNode, IGenerateProperties, IGeneratesBodyCode, IMayRequireScreenPosition
public sealed class SceneDepthNode : AbstractMaterialNode, IGenerateProperties, IGeneratesBodyCode, IMayRequireScreenPosition
{
const string kUVSlotName = "UV";
const string kOutputSlotName = "Out";

}
}
public sealed override void UpdateNodeAfterDeserialization()
public override void UpdateNodeAfterDeserialization()
{
AddSlot(new ScreenPositionMaterialSlot(UVSlotId, kUVSlotName, kUVSlotName));
AddSlot(new Vector1MaterialSlot(OutputSlotId, kOutputSlotName, kOutputSlotName, SlotType.Output, 0));

return uvSlot.RequiresScreenPosition();
}
}
}
}*/

4
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Scene/ScreenNode.cs


namespace UnityEditor.ShaderGraph
{
[Title("Input", "Scene", "Screen")]
public class ScreenNode : AbstractMaterialNode
public sealed class ScreenNode : AbstractMaterialNode
{
const string kOutputSlotName = "Width";
const string kOutputSlot1Name = "Height";

UpdateNodeAfterDeserialization();
}
public sealed override void UpdateNodeAfterDeserialization()
public override void UpdateNodeAfterDeserialization()
{
AddSlot(new Vector1MaterialSlot(OutputSlotId, kOutputSlotName, kOutputSlotName, SlotType.Output, 0));
AddSlot(new Vector1MaterialSlot(OutputSlot1Id, kOutputSlot1Name, kOutputSlot1Name, SlotType.Output, 0));

正在加载...
取消
保存