Tim Cooper
7 年前
当前提交
be067cc2
共有 26 个文件被更改,包括 719 次插入 和 467 次删除
-
2MaterialGraphProject/Assets/NewNodes/Keep/LightProbeNode.cs
-
10MaterialGraphProject/Assets/NewNodes/Keep/ParallaxNode.cs
-
4MaterialGraphProject/Assets/NewNodes/Keep/ReflectionProbeNode.cs
-
6MaterialGraphProject/Assets/NewNodes/Keep/TangentToWorldNode.cs
-
12MaterialGraphProject/Assets/NewNodes/Keep/TransformNode.cs
-
6MaterialGraphProject/Assets/NewNodes/Kill/MultiLayerParallaxNode.cs
-
6MaterialGraphProject/Assets/NewNodes/Kill/POMNode.cs
-
2MaterialGraphProject/Assets/NewNodes/Kill/SphericalIndentationNode.cs
-
4MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Graphs/AbstractMaterialGraph.cs
-
213MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Graphs/MaterialGraph.cs
-
2MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Interfaces/IMayRequireNormal.cs
-
156MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/HLSLNode.cs
-
8MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/Input/Geometry/WorldSpaceBitangentNode.cs
-
14MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/Input/Geometry/WorldSpacePositionNode.cs
-
14MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/Input/Geometry/WorldSpaceTangentNode.cs
-
175MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/MasterNode.cs
-
60MaterialGraphProject/Assets/UnityShaderEditor/Runtime/SubGraph/SubGraphNode.cs
-
289MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Util/ShaderGenerator.cs
-
14MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Interfaces/NeededCoordinateSpace.cs
-
3MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Interfaces/NeededCoordinateSpace.cs.meta
-
43MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/Input/Geometry/NormalNode.cs
-
50MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/Input/Geometry/ViewDirectionNode.cs
-
50MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/Input/Geometry/WorldSpaceViewDirectionNode.cs
-
43MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/Input/Geometry/WorldSpaceNormalNode.cs
-
0/MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/Input/Geometry/NormalNode.cs.meta
-
0/MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/Input/Geometry/ViewDirectionNode.cs.meta
|
|||
using System; |
|||
|
|||
namespace UnityEngine.MaterialGraph |
|||
{ |
|||
[Flags] |
|||
public enum NeededCoordinateSpace |
|||
{ |
|||
None = 0, |
|||
Object = 1<<0, |
|||
View = 1<<1, |
|||
World = 1<<2, |
|||
Tangent = 1<<3 |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 8ad845bb8ef34e4589bcf630a8a8a31a |
|||
timeCreated: 1505627582 |
|
|||
using UnityEngine.Graphing; |
|||
|
|||
namespace UnityEngine.MaterialGraph |
|||
{ |
|||
[Title("Input/Geometry/World Normal")] |
|||
public class NormalNode : AbstractMaterialNode, IMayRequireNormal |
|||
{ |
|||
public const int kOutputSlotId = 0; |
|||
public const string kOutputSlotName = "Normal"; |
|||
|
|||
public NormalNode() |
|||
{ |
|||
name = "Normal"; |
|||
UpdateNodeAfterDeserialization(); |
|||
} |
|||
|
|||
public sealed override void UpdateNodeAfterDeserialization() |
|||
{ |
|||
AddSlot(new MaterialSlot(kOutputSlotId, kOutputSlotName, kOutputSlotName, SlotType.Output, SlotValueType.Vector3, new Vector4(0, 0, 1, 1))); |
|||
RemoveSlotsNameNotMatching(new[] { kOutputSlotId }); |
|||
} |
|||
|
|||
public override bool hasPreview |
|||
{ |
|||
get { return true; } |
|||
} |
|||
|
|||
public override PreviewMode previewMode |
|||
{ |
|||
get { return PreviewMode.Preview3D; } |
|||
} |
|||
|
|||
public override string GetVariableNameForSlot(int slotId) |
|||
{ |
|||
return ShaderGeneratorNames.ObjectSpaceNormal; |
|||
} |
|||
|
|||
public NeededCoordinateSpace RequiresNormal() |
|||
{ |
|||
return NeededCoordinateSpace.Object; |
|||
} |
|||
} |
|||
} |
|
|||
using System.ComponentModel; |
|||
using UnityEngine.Graphing; |
|||
|
|||
namespace UnityEngine.MaterialGraph |
|||
{ |
|||
interface IMayRequireViewDirection |
|||
{ |
|||
NeededCoordinateSpace RequiresViewDirection(); |
|||
} |
|||
|
|||
[Title("Input/Geometry/View Direction")] |
|||
public class ViewDirectionNode : AbstractMaterialNode, IMayRequireViewDirection |
|||
{ |
|||
private const int kOutputSlotId = 0; |
|||
|
|||
public override bool hasPreview { get { return true; } } |
|||
public override PreviewMode previewMode |
|||
{ |
|||
get { return PreviewMode.Preview3D; } |
|||
} |
|||
|
|||
public ViewDirectionNode() |
|||
{ |
|||
name = "ViewDirection"; |
|||
UpdateNodeAfterDeserialization(); |
|||
} |
|||
|
|||
public sealed override void UpdateNodeAfterDeserialization() |
|||
{ |
|||
AddSlot(new MaterialSlot( |
|||
kOutputSlotId, |
|||
ShaderGeneratorNames.WorldSpaceViewDirection, |
|||
ShaderGeneratorNames.WorldSpaceViewDirection, |
|||
SlotType.Output, |
|||
SlotValueType.Vector3, |
|||
Vector4.zero)); |
|||
RemoveSlotsNameNotMatching(new[] { kOutputSlotId }); |
|||
} |
|||
|
|||
public override string GetVariableNameForSlot(int slotId) |
|||
{ |
|||
return ShaderGeneratorNames.WorldSpaceViewDirection; |
|||
} |
|||
|
|||
public NeededCoordinateSpace RequiresViewDirection() |
|||
{ |
|||
return NeededCoordinateSpace.Object; |
|||
} |
|||
} |
|||
} |
|
|||
using System.ComponentModel; |
|||
using UnityEngine.Graphing; |
|||
|
|||
namespace UnityEngine.MaterialGraph |
|||
{ |
|||
interface IMayRequireViewDirection |
|||
{ |
|||
bool RequiresViewDirection(); |
|||
} |
|||
|
|||
[Title("Input/Geometry/World Space View Direction")] |
|||
public class WorldSpaceViewDirectionNode : AbstractMaterialNode, IMayRequireViewDirection |
|||
{ |
|||
private const int kOutputSlotId = 0; |
|||
|
|||
public override bool hasPreview { get { return true; } } |
|||
public override PreviewMode previewMode |
|||
{ |
|||
get { return PreviewMode.Preview3D; } |
|||
} |
|||
|
|||
public WorldSpaceViewDirectionNode() |
|||
{ |
|||
name = "WorldSpaceViewDirection"; |
|||
UpdateNodeAfterDeserialization(); |
|||
} |
|||
|
|||
public sealed override void UpdateNodeAfterDeserialization() |
|||
{ |
|||
AddSlot(new MaterialSlot( |
|||
kOutputSlotId, |
|||
ShaderGeneratorNames.WorldSpaceViewDirection, |
|||
ShaderGeneratorNames.WorldSpaceViewDirection, |
|||
SlotType.Output, |
|||
SlotValueType.Vector3, |
|||
Vector4.zero)); |
|||
RemoveSlotsNameNotMatching(new[] { kOutputSlotId }); |
|||
} |
|||
|
|||
public override string GetVariableNameForSlot(int slotId) |
|||
{ |
|||
return ShaderGeneratorNames.WorldSpaceViewDirection; |
|||
} |
|||
|
|||
public bool RequiresViewDirection() |
|||
{ |
|||
return true; |
|||
} |
|||
} |
|||
} |
|
|||
using UnityEngine.Graphing; |
|||
|
|||
namespace UnityEngine.MaterialGraph |
|||
{ |
|||
[Title("Input/Geometry/World Normal")] |
|||
public class WorldSpaceNormalNode : AbstractMaterialNode, IMayRequireNormal |
|||
{ |
|||
public const int kOutputSlotId = 0; |
|||
public const string kOutputSlotName = "Normal"; |
|||
|
|||
public WorldSpaceNormalNode() |
|||
{ |
|||
name = "WorldNormal"; |
|||
UpdateNodeAfterDeserialization(); |
|||
} |
|||
|
|||
public sealed override void UpdateNodeAfterDeserialization() |
|||
{ |
|||
AddSlot(new MaterialSlot(kOutputSlotId, kOutputSlotName, kOutputSlotName, SlotType.Output, SlotValueType.Vector3, new Vector4(0, 0, 1, 1))); |
|||
RemoveSlotsNameNotMatching(new[] { kOutputSlotId }); |
|||
} |
|||
|
|||
public override bool hasPreview |
|||
{ |
|||
get { return true; } |
|||
} |
|||
|
|||
public override PreviewMode previewMode |
|||
{ |
|||
get { return PreviewMode.Preview3D; } |
|||
} |
|||
|
|||
public override string GetVariableNameForSlot(int slotId) |
|||
{ |
|||
return ShaderGeneratorNames.WorldSpaceNormal; |
|||
} |
|||
|
|||
public bool RequiresNormal() |
|||
{ |
|||
return true; |
|||
} |
|||
} |
|||
} |
撰写
预览
正在加载...
取消
保存
Reference in new issue