浏览代码
Merge branch 'hackweek2017' of https://github.com/stramit/MaterialGraph into hackweek2017
/main
Merge branch 'hackweek2017' of https://github.com/stramit/MaterialGraph into hackweek2017
/main
Florent Guinier
8 年前
当前提交
73112c5a
共有 32 个文件被更改,包括 1523 次插入 和 96 次删除
-
2MaterialGraphProject/Assets/Brandon/Electricity/Electricity.ShaderGraph
-
6MaterialGraphProject/Assets/Brandon/Electricity/Electricity.mat
-
90MaterialGraphProject/Assets/Brandon/Electricity/Electricity.unity
-
12MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Presenters/GradientNodePresenter.cs
-
4MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Presenters/MaterialGraphPresenter.cs
-
2MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/Input/Vector/Vector2Node.cs
-
35MaterialGraphProject/Assets/Vlad/TextureAssetNode.cs
-
1MaterialGraphProject/Assets/_MingWai/GradientNode.cs
-
63MaterialGraphProject/Assets/Matt/UnlitMasterNode.cs
-
12MaterialGraphProject/Assets/Matt/UnlitMasterNode.cs.meta
-
57MaterialGraphProject/Assets/NewNodes/WIP/AACheckerBoardNode.cs
-
12MaterialGraphProject/Assets/NewNodes/WIP/AACheckerBoardNode.cs.meta
-
562MaterialGraphProject/Assets/NewNodes/WIP/AnyNode.cs
-
12MaterialGraphProject/Assets/NewNodes/WIP/AnyNode.cs.meta
-
52MaterialGraphProject/Assets/NewNodes/WIP/RadialShearNode.cs
-
12MaterialGraphProject/Assets/NewNodes/WIP/RadialShearNode.cs.meta
-
49MaterialGraphProject/Assets/NewNodes/WIP/ScaleOffsetNode.cs
-
12MaterialGraphProject/Assets/NewNodes/WIP/ScaleOffsetNode.cs.meta
-
52MaterialGraphProject/Assets/NewNodes/WIP/SphereWarpNode.cs
-
12MaterialGraphProject/Assets/NewNodes/WIP/SphereWarpNode.cs.meta
-
247MaterialGraphProject/Assets/TestAssets/BW_logo.png
-
84MaterialGraphProject/Assets/TestAssets/BW_logo.png.meta
-
110MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Presenters/AnyNodePresenter.cs
-
12MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Presenters/AnyNodePresenter.cs.meta
-
35MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/Input/SceneData/CameraDirNode.cs
-
8MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/Input/SceneData/CameraDirNode.cs.meta
-
36MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/Input/SceneData/CameraPosNode.cs
-
8MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/Input/SceneData/CameraPosNode.cs.meta
-
1MaterialGraphProject/Assets/_MingWai/Gradient.ShaderGraph
-
9MaterialGraphProject/Assets/_MingWai/Gradient.ShaderGraph.meta
-
1MaterialGraphProject/Assets/_MingWai/Gradient_Texture.ShaderGraph
-
9MaterialGraphProject/Assets/_MingWai/Gradient_Texture.ShaderGraph.meta
2
MaterialGraphProject/Assets/Brandon/Electricity/Electricity.ShaderGraph
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
using System; |
|||
using UnityEngine.Graphing; |
|||
|
|||
namespace UnityEngine.MaterialGraph |
|||
{ |
|||
[Serializable] |
|||
[Title("Master/Unlit")] |
|||
public class UnlitMasterNode : AbstractAdvancedMasterNode |
|||
{ |
|||
public const string LightFunctionName = "Advanced"; |
|||
public const string SurfaceOutputStructureName = "SurfaceOutputAdvanced"; |
|||
|
|||
public UnlitMasterNode() |
|||
{ |
|||
name = "UnlitMaster"; |
|||
UpdateNodeAfterDeserialization(); |
|||
} |
|||
|
|||
public override string GetMaterialID() |
|||
{ |
|||
return "SHADINGMODELID_UNLIT"; |
|||
} |
|||
|
|||
public override int[] GetCustomDataSlots() |
|||
{ |
|||
return new int[] { }; |
|||
} |
|||
|
|||
public override string[] GetCustomData() |
|||
{ |
|||
return new string[] { }; |
|||
} |
|||
|
|||
public sealed override void UpdateNodeAfterDeserialization() |
|||
{ |
|||
AddSlot(new MaterialSlot(AlbedoSlotId, AlbedoSlotName, AlbedoSlotName, SlotType.Input, SlotValueType.Vector3, Vector4.zero)); |
|||
AddSlot(new MaterialSlot(NormalSlotId, NormalSlotName, NormalSlotName, SlotType.Input, SlotValueType.Vector3, Vector4.zero)); |
|||
AddSlot(new MaterialSlot(EmissionSlotId, EmissionSlotName, EmissionSlotName, SlotType.Input, SlotValueType.Vector3, Vector4.zero)); |
|||
AddSlot(new MaterialSlot(AlphaSlotId, AlphaSlotName, AlphaSlotName, SlotType.Input, SlotValueType.Vector1, Vector4.zero)); |
|||
|
|||
// clear out slot names that do not match the slots
|
|||
// we support
|
|||
RemoveSlotsNameNotMatching( |
|||
new[] |
|||
{ |
|||
AlbedoSlotId, |
|||
NormalSlotId, |
|||
EmissionSlotId, |
|||
AlphaSlotId |
|||
}); |
|||
} |
|||
|
|||
public override string GetSurfaceOutputName() |
|||
{ |
|||
return SurfaceOutputStructureName; |
|||
} |
|||
|
|||
public override string GetLightFunction() |
|||
{ |
|||
return LightFunctionName; |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: ea393384786555042850882db80a89d9 |
|||
timeCreated: 1478188276 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using UnityEngine.Graphing; |
|||
|
|||
namespace UnityEngine.MaterialGraph |
|||
{ |
|||
[Title("Procedural/AACheckerboard")] |
|||
public class AACheckerboardNode : AnyNode<AACheckerboardNode.Definition> |
|||
{ |
|||
public class Definition : IAnyNodeDefinition |
|||
{ |
|||
public string name { get { return "AACheckerboard"; } } |
|||
|
|||
public AnyNodeProperty[] properties |
|||
{ |
|||
get |
|||
{ |
|||
return new AnyNodeProperty[] |
|||
{ |
|||
// slotId is the 'immutable' value we used to connect things
|
|||
new AnyNodeProperty { slotId= 0, name = "inUVs", description = "Input UV coords", propertyType = PropertyType.Vector2, value = Vector4.zero, state = AnyNodePropertyState.Slot }, |
|||
new AnyNodeProperty { slotId= 1, name = "A", description = "color A", propertyType = PropertyType.Vector4, value= new Vector4(0.2f, 0.2f, 0.2f, 0.2f), state = AnyNodePropertyState.Constant }, |
|||
new AnyNodeProperty { slotId= 2, name = "B", description = "color B", propertyType = PropertyType.Vector4, value= new Vector4(0.7f, 0.7f, 0.7f, 0.7f), state = AnyNodePropertyState.Constant }, |
|||
new AnyNodeProperty { slotId= 3, name = "aaTweak", description = "AA Tweak", propertyType = PropertyType.Vector3, value= new Vector4(0.05f, 3.0f, 0.0f, 0.0f),state = AnyNodePropertyState.Constant }, |
|||
new AnyNodeProperty { slotId= 4, name = "frequency", description = "Frequency", propertyType = PropertyType.Vector2, value = Vector4.one, state = AnyNodePropertyState.Constant }, |
|||
}; |
|||
} |
|||
} |
|||
|
|||
public AnyNodeSlot[] outputs |
|||
{ |
|||
get |
|||
{ |
|||
return new AnyNodeSlot[] |
|||
{ |
|||
new AnyNodeSlot { slotId= 5, name = "outColor", description = "Output color", slotValueType = SlotValueType.Vector4, value = Vector4.zero } |
|||
}; |
|||
} |
|||
} |
|||
|
|||
public string hlsl |
|||
{ |
|||
get |
|||
{ |
|||
return |
|||
"float4 derivatives = float4(ddx(inUVs), ddy(inUVs));\n" + |
|||
"float2 duv_length = sqrt(float2(dot(derivatives.xz, derivatives.xz), dot(derivatives.yw, derivatives.yw)));\n" + |
|||
"float width = 0.5f;\n" + |
|||
"float2 distance3 = 2.0f * abs(frac(inUVs.xy * frequency) - 0.5f) - width;\n" + |
|||
"float2 scale = aaTweak.x / duv_length.xy;\n" + |
|||
"float2 blend_out = saturate((scale - aaTweak.zz) / (aaTweak.yy - aaTweak.zz));\n" + |
|||
"float2 vector_alpha = clamp(distance3 * scale.xy * blend_out.xy, -1.0f, 1.0f);\n" + |
|||
"float alpha = saturate(0.5f + 0.5f * vector_alpha.x * vector_alpha.y);\n" + |
|||
"outColor= lerp(A, B, alpha.xxxx);"; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 7c311b074714f8d468c9bfbf8f91619d |
|||
timeCreated: 1495731579 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System.Collections; |
|||
using System.Collections.Generic; |
|||
using UnityEngine; |
|||
using System; |
|||
|
|||
|
|||
namespace UnityEngine.MaterialGraph |
|||
{ |
|||
[Serializable] |
|||
public class AnyNodeSlot |
|||
{ |
|||
public int slotId; |
|||
public string name; |
|||
public string description; |
|||
public SlotValueType slotValueType; |
|||
public Vector4 value; |
|||
|
|||
public MaterialSlot toMaterialSlot() |
|||
{ |
|||
return new MaterialSlot(slotId, name, name, Graphing.SlotType.Output, slotValueType, value); |
|||
} |
|||
|
|||
public string getTypeDecl(AbstractMaterialNode.OutputPrecision precision) |
|||
{ |
|||
switch (slotValueType) |
|||
{ |
|||
case SlotValueType.sampler2D: |
|||
// TODO
|
|||
break; |
|||
case SlotValueType.Dynamic: |
|||
// TODO
|
|||
break; |
|||
case SlotValueType.Vector1: |
|||
return precision + ""; |
|||
case SlotValueType.Vector2: |
|||
return precision + "2"; |
|||
case SlotValueType.Vector3: |
|||
return precision + "3"; |
|||
case SlotValueType.Vector4: |
|||
return precision + "4"; |
|||
} |
|||
return null; |
|||
} |
|||
}; |
|||
|
|||
[Serializable] |
|||
public enum AnyNodePropertyState |
|||
{ |
|||
Constant = 0, |
|||
Exposed = 1, |
|||
Slot = 2, |
|||
}; |
|||
|
|||
|
|||
[Serializable] |
|||
public class AnyNodeProperty |
|||
{ |
|||
public int slotId; |
|||
public string name; |
|||
public string description; |
|||
public PropertyType propertyType; |
|||
public Vector4 value; |
|||
public AnyNodePropertyState state; |
|||
|
|||
public MaterialSlot toMaterialSlot() |
|||
{ |
|||
// convert property type to slotvaluetype...
|
|||
SlotValueType slotValueType = SlotValueType.Dynamic; |
|||
switch (propertyType) |
|||
{ |
|||
case PropertyType.Color: |
|||
slotValueType = SlotValueType.Vector4; |
|||
break; |
|||
case PropertyType.Texture: |
|||
slotValueType = SlotValueType.sampler2D; |
|||
break; |
|||
case PropertyType.Cubemap: |
|||
slotValueType = SlotValueType.sampler2D; |
|||
break; |
|||
case PropertyType.Float: |
|||
slotValueType = SlotValueType.Vector1; |
|||
break; |
|||
case PropertyType.Vector2: |
|||
slotValueType = SlotValueType.Vector2; |
|||
break; |
|||
case PropertyType.Vector3: |
|||
slotValueType = SlotValueType.Vector3; |
|||
break; |
|||
case PropertyType.Vector4: |
|||
slotValueType = SlotValueType.Vector4; |
|||
break; |
|||
case PropertyType.Matrix2: |
|||
slotValueType = SlotValueType.Matrix2; |
|||
break; |
|||
case PropertyType.Matrix3: |
|||
slotValueType = SlotValueType.Matrix3; |
|||
break; |
|||
case PropertyType.Matrix4: |
|||
slotValueType = SlotValueType.Matrix4; |
|||
break; |
|||
} |
|||
|
|||
return new MaterialSlot(slotId, name, name, Graphing.SlotType.Input, slotValueType, value); |
|||
} |
|||
|
|||
public PropertyChunk toPropertyChunk() |
|||
{ |
|||
switch (propertyType) |
|||
{ |
|||
case PropertyType.Color: |
|||
// TODO
|
|||
break; |
|||
case PropertyType.Texture: |
|||
// TODO
|
|||
break; |
|||
case PropertyType.Cubemap: |
|||
// TODO
|
|||
break; |
|||
case PropertyType.Float: |
|||
return new FloatPropertyChunk(name, description, value.x, PropertyChunk.HideState.Visible); |
|||
case PropertyType.Vector2: |
|||
case PropertyType.Vector3: |
|||
case PropertyType.Vector4: |
|||
return new VectorPropertyChunk(name, description, value, PropertyChunk.HideState.Visible); |
|||
case PropertyType.Matrix2: |
|||
case PropertyType.Matrix3: |
|||
case PropertyType.Matrix4: |
|||
// TODO
|
|||
break; |
|||
} |
|||
return null; |
|||
} |
|||
|
|||
public string getTypeDecl(AbstractMaterialNode.OutputPrecision precision) |
|||
{ |
|||
switch (propertyType) |
|||
{ |
|||
case PropertyType.Color: |
|||
case PropertyType.Texture: |
|||
case PropertyType.Cubemap: |
|||
// TODO
|
|||
return null; |
|||
case PropertyType.Float: |
|||
return precision + ""; |
|||
case PropertyType.Vector2: |
|||
return precision + "2"; |
|||
case PropertyType.Vector3: |
|||
return precision + "3"; |
|||
case PropertyType.Vector4: |
|||
return precision + "4"; |
|||
case PropertyType.Matrix2: |
|||
case PropertyType.Matrix3: |
|||
case PropertyType.Matrix4: |
|||
// TODO
|
|||
break; |
|||
} |
|||
return null; |
|||
} |
|||
} |
|||
|
|||
public interface IAnyNodeDefinition |
|||
{ |
|||
string name { get; } |
|||
AnyNodeProperty[] properties { get; } |
|||
AnyNodeSlot[] outputs { get; } |
|||
string hlsl { get; } |
|||
} |
|||
|
|||
|
|||
public class AnyNodeBase : AbstractMaterialNode |
|||
{ |
|||
// local copy of the definition data -- some of it is state that gets modified by the user
|
|||
// TODO: really we should break the properties and slots into static definition data and mutable user data -- separate structs
|
|||
[SerializeField] |
|||
protected AnyNodeProperty[] m_properties; |
|||
|
|||
[SerializeField] |
|||
protected AnyNodeSlot[] m_outputSlots; |
|||
|
|||
public IEnumerable<AnyNodeProperty> properties |
|||
{ |
|||
get |
|||
{ |
|||
return m_properties; |
|||
} |
|||
} |
|||
|
|||
public int propertyCount |
|||
{ |
|||
get { return m_properties.Length; } |
|||
} |
|||
|
|||
public void setPropertyState(AnyNodeProperty p, AnyNodePropertyState state) |
|||
{ |
|||
if (p.state != state) |
|||
{ |
|||
if ((p.state == AnyNodePropertyState.Slot) && (state != AnyNodePropertyState.Slot)) |
|||
{ |
|||
// Removing slot
|
|||
RemoveSlot(p.slotId); |
|||
} |
|||
else if ((p.state != AnyNodePropertyState.Slot) && (state == AnyNodePropertyState.Slot)) |
|||
{ |
|||
// Adding slot
|
|||
AddSlot(p.toMaterialSlot()); |
|||
} |
|||
|
|||
p.state = state; |
|||
} |
|||
} |
|||
} |
|||
|
|||
// [Title("Abstract Any Node")]
|
|||
public class AnyNode<DEFINITION> : |
|||
AnyNodeBase |
|||
, IGeneratesBodyCode |
|||
, IGeneratesFunction |
|||
|
|||
/* , IMayRequireMeshUV |
|||
, IOnAssetEnabled // TODO
|
|||
, IMayRequireNormal // TODO
|
|||
, IMayRequireTangent |
|||
, IMayRequireBitangent |
|||
, IMayRequireScreenPosition |
|||
, IMayRequireViewDirection |
|||
, IMayRequireWorldPosition |
|||
, IMayRequireVertexColor |
|||
, IMayRequireViewDirectionTangentSpace |
|||
*/ |
|||
where DEFINITION : IAnyNodeDefinition, new() |
|||
{ |
|||
private DEFINITION m_definition; |
|||
|
|||
public string node_name |
|||
{ |
|||
get |
|||
{ |
|||
return m_definition.name; |
|||
} |
|||
} |
|||
|
|||
public string node_hlsl |
|||
{ |
|||
get |
|||
{ |
|||
return m_definition.hlsl; |
|||
} |
|||
} |
|||
|
|||
public AnyNode() |
|||
{ |
|||
m_definition = new DEFINITION(); |
|||
|
|||
m_properties = m_definition.properties; |
|||
|
|||
m_outputSlots = m_definition.outputs; |
|||
|
|||
UpdateNodeAfterDeserialization(); |
|||
} |
|||
|
|||
public sealed override void UpdateNodeAfterDeserialization() |
|||
{ |
|||
// update displayed name of the node
|
|||
name = node_name; |
|||
|
|||
// check new properties and slot definitions -- we want to forward data from the old ones
|
|||
// (just in case the definitions have changed)
|
|||
AnyNodeProperty[] new_properties= m_definition.properties; |
|||
AnyNodeSlot[] new_outputs= m_definition.outputs; |
|||
foreach (AnyNodeSlot s in new_outputs) |
|||
{ |
|||
// try to find matching slot
|
|||
AnyNodeSlot old_slot= Array.Find(m_outputSlots, x => x.slotId == s.slotId); |
|||
if (old_slot != null) |
|||
{ |
|||
s.value = old_slot.value; |
|||
} |
|||
} |
|||
foreach (AnyNodeProperty p in new_properties) |
|||
{ |
|||
// try to find matching old property
|
|||
AnyNodeProperty old_property = Array.Find(m_properties, x => x.slotId == p.slotId); |
|||
if (old_property != null) |
|||
{ |
|||
p.state = old_property.state; |
|||
p.value = old_property.value; |
|||
} |
|||
} |
|||
|
|||
// now that we've copied the old data into the new properties, start using the new properties
|
|||
m_properties = new_properties; |
|||
m_outputSlots = new_outputs; |
|||
|
|||
List<int> validSlotIds = new List<int>(); |
|||
|
|||
// add output slots first
|
|||
foreach (AnyNodeSlot s in m_outputSlots) |
|||
{ |
|||
// add slot to node
|
|||
AddSlot(s.toMaterialSlot()); |
|||
validSlotIds.Add(s.slotId); |
|||
} |
|||
|
|||
// add input slots
|
|||
foreach (AnyNodeProperty p in m_properties) |
|||
{ |
|||
// if this property is an input slot
|
|||
if (p.state == AnyNodePropertyState.Slot) |
|||
{ |
|||
// add slot to node
|
|||
AddSlot(p.toMaterialSlot()); |
|||
validSlotIds.Add(p.slotId); |
|||
} |
|||
} |
|||
|
|||
RemoveSlotsNameNotMatching(validSlotIds); |
|||
} |
|||
|
|||
public override void GeneratePropertyBlock(PropertyGenerator visitor, GenerationMode generationMode) |
|||
{ |
|||
// add uniform shader properties -- constants and textures
|
|||
foreach (AnyNodeProperty p in m_properties) |
|||
{ |
|||
// only exposed properties go in the property block
|
|||
if (p.state == AnyNodePropertyState.Exposed) |
|||
{ |
|||
PropertyChunk property = p.toPropertyChunk(); ; |
|||
if (property != null) |
|||
{ |
|||
visitor.AddShaderProperty(property); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
public override void GeneratePropertyUsages(ShaderGenerator visitor, GenerationMode generationMode) |
|||
{ |
|||
foreach (AnyNodeProperty p in m_properties) |
|||
{ |
|||
// only exposed properties go in the property usage (hlsl declaration)
|
|||
if ((p.state == AnyNodePropertyState.Exposed) || |
|||
(p.state == AnyNodePropertyState.Constant && generationMode.IsPreview())) // constant properties are exposed in preview mode for fast iteration update
|
|||
{ |
|||
string typeDecl = p.getTypeDecl(precision); |
|||
if (typeDecl != null) |
|||
{ |
|||
visitor.AddShaderChunk(typeDecl + " " + p.name + ";", true); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
public override void CollectPreviewMaterialProperties(List<PreviewProperty> property_list) |
|||
{ |
|||
base.CollectPreviewMaterialProperties(property_list); |
|||
|
|||
|
|||
// properties.AddRange(subGraph.GetPreviewProperties()); // ???
|
|||
foreach (AnyNodeProperty p in m_properties) |
|||
{ |
|||
|
|||
switch (p.propertyType) |
|||
{ |
|||
case PropertyType.Float: |
|||
case PropertyType.Vector2: |
|||
case PropertyType.Vector3: |
|||
case PropertyType.Vector4: |
|||
property_list.Add( |
|||
new PreviewProperty |
|||
{ |
|||
m_Name = p.name, |
|||
m_PropType = p.propertyType, |
|||
m_Vector4 = p.value |
|||
}); |
|||
break; |
|||
} |
|||
} |
|||
} |
|||
|
|||
|
|||
public string GetFunctionName() |
|||
{ |
|||
return "unity_any_" + node_name + "_" + precision; |
|||
} |
|||
|
|||
protected virtual string GetFunctionPrototype() |
|||
{ |
|||
string result = "inline void " + GetFunctionName() + "("; |
|||
|
|||
// inputs (slots & properties) first
|
|||
bool comma = false; |
|||
foreach (AnyNodeProperty p in m_properties) |
|||
{ |
|||
string typeDecl = p.getTypeDecl(precision); |
|||
result += "in " + typeDecl + " " + p.name + ", "; |
|||
comma = true; |
|||
} |
|||
|
|||
// then 'globals'
|
|||
// TODO
|
|||
|
|||
// then outputs
|
|||
foreach (AnyNodeSlot s in m_outputSlots) |
|||
{ |
|||
string typeDecl = s.getTypeDecl(precision); |
|||
result += "out " + typeDecl + " " + s.name + ", "; |
|||
comma = true; |
|||
} |
|||
|
|||
// remove last comma, if any
|
|||
if (comma) |
|||
{ |
|||
result= result.Remove(result.Length - 2); |
|||
} |
|||
|
|||
result += ")"; |
|||
|
|||
return result; |
|||
} |
|||
|
|||
public void GenerateNodeFunction(ShaderGenerator visitor, GenerationMode generationMode) |
|||
{ |
|||
var outputString = new ShaderGenerator(); |
|||
outputString.AddShaderChunk(GetFunctionPrototype(), false); |
|||
outputString.AddShaderChunk("{", false); |
|||
outputString.Indent(); |
|||
outputString.AddShaderChunk(node_hlsl, false); |
|||
outputString.Deindent(); |
|||
outputString.AddShaderChunk("}", false); |
|||
|
|||
visitor.AddShaderChunk(outputString.GetShaderString(0), true); |
|||
} |
|||
|
|||
public void GenerateNodeCode(ShaderGenerator visitor, GenerationMode generationMode) |
|||
{ |
|||
var outputString = new ShaderGenerator(); |
|||
|
|||
outputString.AddShaderChunk("// AnyNode '" + node_name + "'", false); |
|||
|
|||
// declare and initialize output slot variables
|
|||
foreach (AnyNodeSlot s in m_outputSlots) |
|||
{ |
|||
var typeDecl = s.getTypeDecl(OutputPrecision.@float); // precision
|
|||
|
|||
if (typeDecl != null) |
|||
{ |
|||
outputString.AddShaderChunk( |
|||
typeDecl |
|||
+ " " |
|||
+ GetVariableNameForSlot(s.slotId) |
|||
+ " = 0;", false); // TODO non float type default value?
|
|||
} |
|||
} |
|||
|
|||
// open new context, in case our property names conflict with something
|
|||
outputString.AddShaderChunk("{", false); |
|||
outputString.Indent(); |
|||
|
|||
// add static declarations for contant properties
|
|||
foreach (AnyNodeProperty p in m_properties) |
|||
{ |
|||
if (p.state != AnyNodePropertyState.Constant || generationMode.IsPreview()) // except in preview mode...
|
|||
continue; |
|||
|
|||
string typeDecl= p.getTypeDecl(precision); |
|||
|
|||
if (typeDecl != null) |
|||
{ |
|||
switch (p.propertyType) |
|||
{ |
|||
case PropertyType.Color: |
|||
// TODO
|
|||
break; |
|||
case PropertyType.Texture: |
|||
// TODO
|
|||
break; |
|||
case PropertyType.Cubemap: |
|||
// TODO
|
|||
break; |
|||
case PropertyType.Float: |
|||
visitor.AddShaderChunk(typeDecl + " " + p.name + " = " + p.value.x + ";", true); |
|||
break; |
|||
case PropertyType.Vector2: |
|||
visitor.AddShaderChunk(typeDecl + " " + p.name + " = " + typeDecl + "(" + p.value.x + ", " + p.value.y + ");", true); |
|||
break; |
|||
case PropertyType.Vector3: |
|||
visitor.AddShaderChunk(typeDecl + " " + p.name + " = " + typeDecl + "(" + p.value.x + ", " + p.value.y + ", " + p.value.z + ");", true); |
|||
break; |
|||
case PropertyType.Vector4: |
|||
visitor.AddShaderChunk(typeDecl + " " + p.name + " = " + typeDecl + "(" + p.value.x + ", " + p.value.y + ", " + p.value.z + ", " + p.value.w + ");", true); |
|||
break; |
|||
case PropertyType.Matrix2: |
|||
case PropertyType.Matrix3: |
|||
case PropertyType.Matrix4: |
|||
// TODO
|
|||
|
|||
break; |
|||
} |
|||
} |
|||
} |
|||
|
|||
// call function
|
|||
outputString.AddShaderChunk(GetFunctionName() + "(", false); |
|||
outputString.Indent(); |
|||
outputString.AddShaderChunk("// input slots and properties", false); |
|||
|
|||
bool first = true; |
|||
foreach (AnyNodeProperty p in m_properties) |
|||
{ |
|||
string inputVariableName; |
|||
if (p.state == AnyNodePropertyState.Slot) |
|||
{ |
|||
inputVariableName = GetSlotValue(p.slotId, generationMode); |
|||
} |
|||
else |
|||
{ |
|||
// constant or property
|
|||
inputVariableName = p.name; |
|||
} |
|||
outputString.AddShaderChunk((first ? "" : ",") + inputVariableName, false); |
|||
first = false; |
|||
} |
|||
|
|||
outputString.AddShaderChunk("// output parameters", false); |
|||
foreach (AnyNodeSlot s in m_outputSlots) |
|||
{ |
|||
outputString.AddShaderChunk((first ? "" : ",") + GetVariableNameForSlot(s.slotId), false); |
|||
first = false; |
|||
} |
|||
|
|||
outputString.AddShaderChunk(");", false); // TODO: get rid of parameter hack
|
|||
outputString.Deindent(); |
|||
|
|||
outputString.Deindent(); |
|||
outputString.AddShaderChunk("}", false); |
|||
|
|||
// done splicing translated hlsl! yay
|
|||
visitor.AddShaderChunk(outputString.GetShaderString(0), true); |
|||
} |
|||
|
|||
public override bool hasPreview |
|||
{ |
|||
get { return true; } |
|||
} |
|||
|
|||
public override PreviewMode previewMode |
|||
{ |
|||
get |
|||
{ |
|||
return PreviewMode.Preview2D; |
|||
} |
|||
} |
|||
|
|||
bool RequiresMeshUV(UVChannel channel) |
|||
{ |
|||
// TODO
|
|||
return false; |
|||
} |
|||
|
|||
} |
|||
} |
|||
|
|
|||
fileFormatVersion: 2 |
|||
guid: 38b06780b4d2b274b91e1c2c5627f95d |
|||
timeCreated: 1495627163 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using UnityEngine.Graphing; |
|||
|
|||
namespace UnityEngine.MaterialGraph |
|||
{ |
|||
[Title("UV/RadialShearNode")] |
|||
public class RadialShearNode : AnyNode<RadialShearNode.Definition> |
|||
{ |
|||
public class Definition : IAnyNodeDefinition |
|||
{ |
|||
public string name { get { return "RadialShear"; } } |
|||
|
|||
public AnyNodeProperty[] properties |
|||
{ |
|||
get |
|||
{ |
|||
return new AnyNodeProperty[] |
|||
{ |
|||
// slotId is the 'immutable' value we used to connect things
|
|||
new AnyNodeProperty { slotId= 0, name = "inUVs", description = "Input UV coords", propertyType = PropertyType.Vector2, value = Vector4.zero, state = AnyNodePropertyState.Slot }, |
|||
new AnyNodeProperty { slotId= 1, name = "center", description = "UV radial center point", propertyType = PropertyType.Vector2, value= new Vector4(0.5f, 0.5f, 0.5f, 0.5f), state = AnyNodePropertyState.Constant }, |
|||
new AnyNodeProperty { slotId= 2, name = "shearAmount", description = "Shear amount", propertyType = PropertyType.Vector2, value= Vector4.one, state = AnyNodePropertyState.Constant }, |
|||
new AnyNodeProperty { slotId= 3, name = "offset", description = "UV offset", propertyType = PropertyType.Vector2, value= Vector4.zero, state = AnyNodePropertyState.Constant }, |
|||
}; |
|||
} |
|||
} |
|||
|
|||
public AnyNodeSlot[] outputs |
|||
{ |
|||
get |
|||
{ |
|||
return new AnyNodeSlot[] |
|||
{ |
|||
new AnyNodeSlot { slotId= 4, name = "outUVs", description = "Output UV texture coordinates", slotValueType = SlotValueType.Vector2, value = Vector4.zero } |
|||
}; |
|||
} |
|||
} |
|||
|
|||
public string hlsl |
|||
{ |
|||
get |
|||
{ |
|||
return |
|||
"float2 delta = inUVs - center;\n" + |
|||
"float delta2 = dot(delta.xy, delta.xy);\n" + |
|||
"float2 delta_offset = delta2 * shearAmount;\n" + |
|||
"outUVs = inUVs + float2(delta.y, -delta.x) * delta_offset + offset;"; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
|
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 568baa0401e6eee42a35609013ee8100 |
|||
timeCreated: 1495728068 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using UnityEngine.Graphing; |
|||
|
|||
namespace UnityEngine.MaterialGraph |
|||
{ |
|||
[Title("UV/ScaleOffset")] |
|||
public class ScaleOffsetNode : AnyNode<ScaleOffsetNode.Definition> |
|||
{ |
|||
public class Definition : IAnyNodeDefinition |
|||
{ |
|||
public string name { get { return "ScaleOffset"; } } |
|||
|
|||
public AnyNodeProperty[] properties |
|||
{ |
|||
get |
|||
{ |
|||
return new AnyNodeProperty[] |
|||
{ |
|||
// slotId is the 'immutable' value we used to connect things
|
|||
new AnyNodeProperty { slotId= 0, name = "inUVs", description = "Input UV coords", propertyType = PropertyType.Vector2, value = Vector4.zero, state = AnyNodePropertyState.Slot }, |
|||
new AnyNodeProperty { slotId= 1, name = "scale", description = "UV scale", propertyType = PropertyType.Vector2, value= Vector4.one, state = AnyNodePropertyState.Constant }, |
|||
new AnyNodeProperty { slotId= 2, name = "scaleCenter", description = "UV scale center", propertyType = PropertyType.Vector2, value= new Vector4(0.5f, 0.5f, 0.5f, 0.5f), state = AnyNodePropertyState.Constant }, |
|||
new AnyNodeProperty { slotId= 3, name = "offset", description = "UV offset", propertyType = PropertyType.Vector2, value= Vector4.zero, state = AnyNodePropertyState.Constant }, |
|||
}; |
|||
} |
|||
} |
|||
|
|||
public AnyNodeSlot[] outputs |
|||
{ |
|||
get |
|||
{ |
|||
return new AnyNodeSlot[] |
|||
{ |
|||
new AnyNodeSlot { slotId= 4, name = "outUVs", description = "Output UV texture coordinates", slotValueType = SlotValueType.Vector2, value = Vector4.zero } |
|||
}; |
|||
} |
|||
} |
|||
|
|||
public string hlsl |
|||
{ |
|||
get |
|||
{ |
|||
return |
|||
"float4 xform= float4(scale, offset + scaleCenter - scaleCenter * scale);\n" + |
|||
"outUVs = inUVs * xform.xy + xform.zw;"; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 28273174b61bbd246b556e236deb7556 |
|||
timeCreated: 1495726779 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using UnityEngine.Graphing; |
|||
|
|||
namespace UnityEngine.MaterialGraph |
|||
{ |
|||
[Title("UV/SphereWarpNode")] |
|||
public class SphereWarpNode : AnyNode<SphereWarpNode.Definition> |
|||
{ |
|||
public class Definition : IAnyNodeDefinition |
|||
{ |
|||
public string name { get { return "SphereWarp"; } } |
|||
|
|||
public AnyNodeProperty[] properties |
|||
{ |
|||
get |
|||
{ |
|||
return new AnyNodeProperty[] |
|||
{ |
|||
// slotId is the 'immutable' value we used to connect things
|
|||
new AnyNodeProperty { slotId= 0, name = "inUVs", description = "Input UV coords", propertyType = PropertyType.Vector2, value = Vector4.zero, state = AnyNodePropertyState.Slot }, |
|||
new AnyNodeProperty { slotId= 1, name = "center", description = "UV radial center point", propertyType = PropertyType.Vector2, value= new Vector4(0.5f, 0.5f, 0.5f, 0.5f), state = AnyNodePropertyState.Constant }, |
|||
new AnyNodeProperty { slotId= 2, name = "warpAmount", description = "Warp amount", propertyType = PropertyType.Vector2, value= Vector4.one, state = AnyNodePropertyState.Constant }, |
|||
new AnyNodeProperty { slotId= 3, name = "offset", description = "UV offset", propertyType = PropertyType.Vector2, value= Vector4.zero, state = AnyNodePropertyState.Constant }, |
|||
}; |
|||
} |
|||
} |
|||
|
|||
public AnyNodeSlot[] outputs |
|||
{ |
|||
get |
|||
{ |
|||
return new AnyNodeSlot[] |
|||
{ |
|||
new AnyNodeSlot { slotId= 4, name = "outUVs", description = "Output UV texture coordinates", slotValueType = SlotValueType.Vector2, value = Vector4.zero } |
|||
}; |
|||
} |
|||
} |
|||
|
|||
public string hlsl |
|||
{ |
|||
get |
|||
{ |
|||
return |
|||
"float2 delta = inUVs - center;\n" + |
|||
"float delta2 = dot(delta.xy, delta.xy);\n" + |
|||
"float delta4 = delta2 * delta2;\n" + |
|||
"float2 delta_offset = delta4 * warpAmount;\n" + |
|||
"outUVs = inUVs + delta * delta_offset + offset;"; |
|||
} |
|||
} |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: dfd538e33eb01974fad49a2533f8cff8 |
|||
timeCreated: 1495729511 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
fileFormatVersion: 2 |
|||
guid: 8080b3773b9568a46bcaaf9b18512990 |
|||
timeCreated: 1495742078 |
|||
licenseType: Pro |
|||
TextureImporter: |
|||
fileIDToRecycleName: {} |
|||
serializedVersion: 4 |
|||
mipmaps: |
|||
mipMapMode: 0 |
|||
enableMipMap: 0 |
|||
sRGBTexture: 1 |
|||
linearTexture: 0 |
|||
fadeOut: 0 |
|||
borderMipMap: 0 |
|||
mipMapsPreserveCoverage: 0 |
|||
alphaTestReferenceValue: 0.5 |
|||
mipMapFadeDistanceStart: 1 |
|||
mipMapFadeDistanceEnd: 3 |
|||
bumpmap: |
|||
convertToNormalMap: 0 |
|||
externalNormalMap: 0 |
|||
heightScale: 0.25 |
|||
normalMapFilter: 0 |
|||
isReadable: 0 |
|||
grayScaleToAlpha: 0 |
|||
generateCubemap: 6 |
|||
cubemapConvolution: 0 |
|||
seamlessCubemap: 0 |
|||
textureFormat: 1 |
|||
maxTextureSize: 2048 |
|||
textureSettings: |
|||
serializedVersion: 2 |
|||
filterMode: -1 |
|||
aniso: -1 |
|||
mipBias: -1 |
|||
wrapU: 1 |
|||
wrapV: 1 |
|||
wrapW: 1 |
|||
nPOTScale: 1 |
|||
lightmap: 0 |
|||
compressionQuality: 50 |
|||
spriteMode: 0 |
|||
spriteExtrude: 1 |
|||
spriteMeshType: 1 |
|||
alignment: 0 |
|||
spritePivot: {x: 0.5, y: 0.5} |
|||
spriteBorder: {x: 0, y: 0, z: 0, w: 0} |
|||
spritePixelsToUnits: 100 |
|||
alphaUsage: 1 |
|||
alphaIsTransparency: 1 |
|||
spriteTessellationDetail: -1 |
|||
textureType: 0 |
|||
textureShape: 1 |
|||
maxTextureSizeSet: 0 |
|||
compressionQualitySet: 0 |
|||
textureFormatSet: 0 |
|||
platformSettings: |
|||
- buildTarget: DefaultTexturePlatform |
|||
maxTextureSize: 2048 |
|||
resizeAlgorithm: 1 |
|||
textureFormat: -1 |
|||
textureCompression: 2 |
|||
compressionQuality: 50 |
|||
crunchedCompression: 0 |
|||
allowsAlphaSplitting: 0 |
|||
overridden: 0 |
|||
- buildTarget: Standalone |
|||
maxTextureSize: 2048 |
|||
resizeAlgorithm: 1 |
|||
textureFormat: -1 |
|||
textureCompression: 2 |
|||
compressionQuality: 50 |
|||
crunchedCompression: 0 |
|||
allowsAlphaSplitting: 0 |
|||
overridden: 0 |
|||
spriteSheet: |
|||
serializedVersion: 2 |
|||
sprites: [] |
|||
outline: [] |
|||
physicsShape: [] |
|||
spritePackingTag: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using RMGUI.GraphView; |
|||
using UnityEditor.Graphing.Drawing; |
|||
using UnityEditor; |
|||
using UnityEngine; |
|||
using UnityEngine.MaterialGraph; |
|||
|
|||
namespace UnityEditor.MaterialGraph.Drawing |
|||
{ |
|||
class AnyNodeControlPresenter : GraphControlPresenter |
|||
{ |
|||
public override void OnGUIHandler() |
|||
{ |
|||
base.OnGUIHandler(); |
|||
|
|||
var tNode = node as UnityEngine.MaterialGraph.AnyNodeBase; |
|||
if (tNode == null) |
|||
return; |
|||
|
|||
var properties = tNode.properties; |
|||
|
|||
EditorGUI.BeginChangeCheck(); |
|||
UnityEngine.Graphing.ModificationScope modificationScope = UnityEngine.Graphing.ModificationScope.Node; |
|||
|
|||
foreach (AnyNodeProperty p in properties) |
|||
{ |
|||
AnyNodePropertyState newState = (AnyNodePropertyState) EditorGUILayout.EnumPopup(p.name, p.state); |
|||
if (newState != p.state) |
|||
{ |
|||
tNode.setPropertyState(p, newState); |
|||
|
|||
modificationScope = UnityEngine.Graphing.ModificationScope.Graph; |
|||
} |
|||
|
|||
bool disabled = p.state == AnyNodePropertyState.Slot; |
|||
EditorGUI.BeginDisabledGroup(disabled); |
|||
{ |
|||
switch (p.propertyType) |
|||
{ |
|||
case PropertyType.Color: |
|||
// TODO
|
|||
break; |
|||
case PropertyType.Texture: |
|||
// TODO
|
|||
break; |
|||
case PropertyType.Cubemap: |
|||
// TODO
|
|||
break; |
|||
case PropertyType.Float: |
|||
p.value.x = EditorGUILayout.FloatField("", p.value.x); |
|||
break; |
|||
case PropertyType.Vector2: |
|||
{ |
|||
Vector2 result = EditorGUILayout.Vector2Field("", new Vector2(p.value.x, p.value.y)); |
|||
p.value.x = result.x; |
|||
p.value.y = result.y; |
|||
} |
|||
break; |
|||
case PropertyType.Vector3: |
|||
p.value = EditorGUILayout.Vector3Field("", p.value); |
|||
break; |
|||
case PropertyType.Vector4: |
|||
p.value = EditorGUILayout.Vector4Field("", p.value); |
|||
break; |
|||
case PropertyType.Matrix2: |
|||
// p.value = EditorGUILayout.Matrix2Field("", p.value);
|
|||
break; |
|||
case PropertyType.Matrix3: |
|||
// p.value = EditorGUILayout.Matrix3Field("", p.value);
|
|||
break; |
|||
case PropertyType.Matrix4: |
|||
// p.value = EditorGUILayout.Matrix4Field("", p.value);
|
|||
break; |
|||
} |
|||
} |
|||
EditorGUI.EndDisabledGroup(); |
|||
} |
|||
|
|||
bool changed= EditorGUI.EndChangeCheck(); |
|||
|
|||
if (changed) |
|||
{ |
|||
if (tNode.onModified != null) |
|||
tNode.onModified(tNode, modificationScope); |
|||
} |
|||
} |
|||
|
|||
public override float GetHeight() |
|||
{ |
|||
var tNode = node as UnityEngine.MaterialGraph.AnyNodeBase; |
|||
if (tNode == null) |
|||
return EditorGUIUtility.standardVerticalSpacing; |
|||
|
|||
return (EditorGUIUtility.singleLineHeight + EditorGUIUtility.standardVerticalSpacing) * tNode.propertyCount * 2 |
|||
+ EditorGUIUtility.standardVerticalSpacing; |
|||
} |
|||
} |
|||
|
|||
[Serializable] |
|||
public class AnyNodePresenter : PropertyNodePresenter |
|||
{ |
|||
protected override IEnumerable<GraphElementPresenter> GetControlData() |
|||
{ |
|||
var instance = CreateInstance<AnyNodeControlPresenter>(); |
|||
instance.Initialize(node); |
|||
return new List<GraphElementPresenter>(base.GetControlData()) { instance }; |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: ce4472789956d684f89df3578d7d1d6d |
|||
timeCreated: 1495707441 |
|||
licenseType: Pro |
|||
MonoImporter: |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|
|||
using UnityEngine.Graphing; |
|||
|
|||
namespace UnityEngine.MaterialGraph |
|||
{ |
|||
[Title("Input/Scene Data/Camera Direction")] |
|||
public class CamDirNode : AbstractMaterialNode |
|||
{ |
|||
public CamDirNode() |
|||
{ |
|||
name = "CameraDirection"; |
|||
UpdateNodeAfterDeserialization(); |
|||
} |
|||
|
|||
private const int kOutputSlotId = 0; |
|||
private const string kOutputSlotName = "Output"; |
|||
|
|||
public override bool hasPreview { get { return true; } } |
|||
public override PreviewMode previewMode |
|||
{ |
|||
get { return PreviewMode.Preview2D; } |
|||
} |
|||
|
|||
|
|||
public sealed override void UpdateNodeAfterDeserialization() |
|||
{ |
|||
AddSlot(new MaterialSlot(kOutputSlotId, kOutputSlotName, kOutputSlotName, SlotType.Output, SlotValueType.Vector4, Vector4.zero)); |
|||
RemoveSlotsNameNotMatching(new[] { kOutputSlotId }); |
|||
} |
|||
|
|||
public override string GetVariableNameForSlot(int slotId) |
|||
{ |
|||
return "UNITY_MATRIX_IT_MV [2].xyz"; |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: dd27728b9ce314209beef46e595204c5 |
|||
MonoImporter: |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|
|||
using UnityEngine.Graphing; |
|||
|
|||
namespace UnityEngine.MaterialGraph |
|||
{ |
|||
[Title("Input/Scene Data/Camera Position")] |
|||
public class CamPosNode : AbstractMaterialNode |
|||
{ |
|||
//TODO - should be a global and immpiment a Imayrequire
|
|||
public CamPosNode() |
|||
{ |
|||
name = "CameraPosition"; |
|||
UpdateNodeAfterDeserialization(); |
|||
} |
|||
|
|||
private const int kOutputSlotId = 0; |
|||
private const string kOutputSlotName = "Output"; |
|||
|
|||
public override bool hasPreview { get { return true; } } |
|||
public override PreviewMode previewMode |
|||
{ |
|||
get { return PreviewMode.Preview2D; } |
|||
} |
|||
|
|||
|
|||
public sealed override void UpdateNodeAfterDeserialization() |
|||
{ |
|||
AddSlot(new MaterialSlot(kOutputSlotId, kOutputSlotName, kOutputSlotName, SlotType.Output, SlotValueType.Vector4, Vector4.zero)); |
|||
RemoveSlotsNameNotMatching(new[] { kOutputSlotId }); |
|||
} |
|||
|
|||
public override string GetVariableNameForSlot(int slotId) |
|||
{ |
|||
return "_WorldSpaceCameraPos"; |
|||
} |
|||
} |
|||
} |
|
|||
fileFormatVersion: 2 |
|||
guid: 27a1751acacc54e278090fb991699a90 |
|||
MonoImporter: |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
1
MaterialGraphProject/Assets/_MingWai/Gradient.ShaderGraph
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: 12adeac2a3368e94f9889377e4d426c2 |
|||
timeCreated: 1495742113 |
|||
licenseType: Pro |
|||
ScriptedImporter: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} |
1
MaterialGraphProject/Assets/_MingWai/Gradient_Texture.ShaderGraph
文件差异内容过多而无法显示
查看文件
文件差异内容过多而无法显示
查看文件
|
|||
fileFormatVersion: 2 |
|||
guid: ff2b03d7feb67a145835ad8adae9e0ad |
|||
timeCreated: 1495742113 |
|||
licenseType: Pro |
|||
ScriptedImporter: |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
|||
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3} |
撰写
预览
正在加载...
取消
保存
Reference in new issue