浏览代码

Merge branch 'hackweek2017' of https://github.com/stramit/MaterialGraph into hackweek2017

/main
bfogerty 8 年前
当前提交
abec21f1
共有 47 个文件被更改,包括 2658 次插入7 次删除
  1. 12
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Presenters/GradientNodePresenter.cs
  2. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Presenters/MaterialGraphPresenter.cs
  3. 10
      MaterialGraphProject/Assets/Vlad/TextureAssetNode.cs
  4. 1
      MaterialGraphProject/Assets/_MingWai/GradientNode.cs
  5. 1
      MaterialGraphProject/Assets/Florent/2Pass.ShaderGraph
  6. 9
      MaterialGraphProject/Assets/Florent/2Pass.ShaderGraph.meta
  7. 44
      MaterialGraphProject/Assets/Florent/2PassCustomTexture.asset
  8. 9
      MaterialGraphProject/Assets/Florent/2PassCustomTexture.asset.meta
  9. 9
      MaterialGraphProject/Assets/Florent/FirstPass.meta
  10. 75
      MaterialGraphProject/Assets/Florent/MaterialWith2PassTexture.mat
  11. 9
      MaterialGraphProject/Assets/Florent/MaterialWith2PassTexture.mat.meta
  12. 25
      MaterialGraphProject/Assets/Florent/UnityEngine.MaterialGraph.ExportTextureMasterNode71166862-083a-4792-8c3a-4111b9dd9d37.mat
  13. 9
      MaterialGraphProject/Assets/Florent/UnityEngine.MaterialGraph.ExportTextureMasterNode71166862-083a-4792-8c3a-4111b9dd9d37.mat.meta
  14. 57
      MaterialGraphProject/Assets/NewNodes/WIP/AACheckerBoardNode.cs
  15. 12
      MaterialGraphProject/Assets/NewNodes/WIP/AACheckerBoardNode.cs.meta
  16. 562
      MaterialGraphProject/Assets/NewNodes/WIP/AnyNode.cs
  17. 12
      MaterialGraphProject/Assets/NewNodes/WIP/AnyNode.cs.meta
  18. 52
      MaterialGraphProject/Assets/NewNodes/WIP/RadialShearNode.cs
  19. 12
      MaterialGraphProject/Assets/NewNodes/WIP/RadialShearNode.cs.meta
  20. 49
      MaterialGraphProject/Assets/NewNodes/WIP/ScaleOffsetNode.cs
  21. 12
      MaterialGraphProject/Assets/NewNodes/WIP/ScaleOffsetNode.cs.meta
  22. 52
      MaterialGraphProject/Assets/NewNodes/WIP/SphereWarpNode.cs
  23. 12
      MaterialGraphProject/Assets/NewNodes/WIP/SphereWarpNode.cs.meta
  24. 247
      MaterialGraphProject/Assets/TestAssets/BW_logo.png
  25. 84
      MaterialGraphProject/Assets/TestAssets/BW_logo.png.meta
  26. 110
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Presenters/AnyNodePresenter.cs
  27. 12
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Presenters/AnyNodePresenter.cs.meta
  28. 35
      MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/Input/SceneData/CameraDirNode.cs
  29. 8
      MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/Input/SceneData/CameraDirNode.cs.meta
  30. 36
      MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/Input/SceneData/CameraPosNode.cs
  31. 8
      MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/Input/SceneData/CameraPosNode.cs.meta
  32. 1
      MaterialGraphProject/Assets/_MingWai/Gradient.ShaderGraph
  33. 9
      MaterialGraphProject/Assets/_MingWai/Gradient.ShaderGraph.meta
  34. 1
      MaterialGraphProject/Assets/_MingWai/Gradient_Texture.ShaderGraph
  35. 9
      MaterialGraphProject/Assets/_MingWai/Gradient_Texture.ShaderGraph.meta
  36. 75
      MaterialGraphProject/Assets/Florent/FirstPass/AnimatedMaterial.mat
  37. 9
      MaterialGraphProject/Assets/Florent/FirstPass/AnimatedMaterial.mat.meta
  38. 44
      MaterialGraphProject/Assets/Florent/FirstPass/CustomTexture.asset
  39. 9
      MaterialGraphProject/Assets/Florent/FirstPass/CustomTexture.asset.meta
  40. 861
      MaterialGraphProject/Assets/Florent/FirstPass/New Scene.unity
  41. 8
      MaterialGraphProject/Assets/Florent/FirstPass/New Scene.unity.meta
  42. 1
      MaterialGraphProject/Assets/Florent/FirstPass/RealtimeUpdate.ShaderGraph
  43. 9
      MaterialGraphProject/Assets/Florent/FirstPass/RealtimeUpdate.ShaderGraph.meta
  44. 30
      MaterialGraphProject/Assets/Florent/FirstPass/UnityEngine.MaterialGraph.ExportTextureMasterNodeeac16720-baa9-4e44-8ca0-c395445c4ed3.mat
  45. 9
      MaterialGraphProject/Assets/Florent/FirstPass/UnityEngine.MaterialGraph.ExportTextureMasterNodeeac16720-baa9-4e44-8ca0-c395445c4ed3.mat.meta
  46. 1
      MaterialGraphProject/Assets/Florent/GeneratedTexture.meta

12
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Presenters/GradientNodePresenter.cs


[Serializable]
class GradientContolPresenter : GraphControlPresenter
{
[SerializeField]
[SerializeField]
[SerializeField]
private UnityEngine.MaterialGraph.GradientNode prevnode;
private string prevWindow = "";

{
prevnode = cNode;
gradientobj = new GradientObject();
if (cNode.gradient != null)
{
gradientobj.gradient = cNode.gradient;
}
hserializedObject = new SerializedObject(gradientobj);
hcolorGradient = hserializedObject.FindProperty("gradient");
}

}
}
[Serializable]
public class GradientObject : ScriptableObject
{
public Gradient gradient = new Gradient();

4
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Presenters/MaterialGraphPresenter.cs


typeMapper[typeof(Vector2Node)] = typeof(Vector2NodePresenter);
typeMapper[typeof(Vector3Node)] = typeof(Vector3NodePresenter);
typeMapper[typeof(Vector4Node)] = typeof(Vector4NodePresenter);
typeMapper[typeof(ScaleOffsetNode)] = typeof(AnyNodePresenter); // anything derived from AnyNode should use the AnyNodePresenter
typeMapper[typeof(RadialShearNode)] = typeof(AnyNodePresenter); // anything derived from AnyNode should use the AnyNodePresenter
typeMapper[typeof(SphereWarpNode)] = typeof(AnyNodePresenter); // anything derived from AnyNode should use the AnyNodePresenter
typeMapper[typeof(AACheckerboardNode)] = typeof(AnyNodePresenter); // anything derived from AnyNode should use the AnyNodePresenter
typeMapper[typeof(SubGraphNode)] = typeof(SubgraphNodePresenter);
typeMapper[typeof(RemapMasterNode)] = typeof(RemapMasterNodePresenter);
typeMapper[typeof(MasterRemapInputNode)] = typeof(RemapInputNodePresenter);

10
MaterialGraphProject/Assets/Vlad/TextureAssetNode.cs


public override void GeneratePropertyUsages(ShaderGenerator visitor, GenerationMode generationMode)
{
var slotTexture2D = FindInputSlot<MaterialSlot>(0);
var slotTexture2D = FindOutputSlot<MaterialSlot>(0);
if (slotTexture2D != null)
{
var edgesTexture2D = owner.GetEdges(slotTexture2D.slotReference).ToList();

visitor.AddShaderChunk("Texture2D " + propertyName + "_T2D;", true);
visitor.AddShaderChunk("Texture2D " + propertyName + ";", true);
var slotSampler2D = FindInputSlot<MaterialSlot>(0);
var slotSampler2D = FindOutputSlot<MaterialSlot>(1);
var edgesSampler2D = owner.GetEdges(slotTexture2D.slotReference).ToList();
var edgesSampler2D = owner.GetEdges(slotSampler2D.slotReference).ToList();
visitor.AddShaderChunk("Sampler2D " + propertyName + "_S2D;", true);
visitor.AddShaderChunk("sampler2D " + propertyName + ";", true);
}
}
}

1
MaterialGraphProject/Assets/_MingWai/GradientNode.cs


[SerializeField]
private Gradient m_gradient;
public Gradient gradient
{
get { return m_gradient; }

1
MaterialGraphProject/Assets/Florent/2Pass.ShaderGraph
文件差异内容过多而无法显示
查看文件

9
MaterialGraphProject/Assets/Florent/2Pass.ShaderGraph.meta


fileFormatVersion: 2
guid: 9de4796ffebd15d4a9d6e044a172fe49
timeCreated: 1495744149
licenseType: Pro
ScriptedImporter:
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}

44
MaterialGraphProject/Assets/Florent/2PassCustomTexture.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!86 &8600000
CustomRenderTexture:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: 2PassCustomTexture
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_Width: 256
m_Height: 256
m_AntiAliasing: 1
m_DepthFormat: 0
m_ColorFormat: 0
m_MipMap: 0
m_GenerateMips: 1
m_SRGB: 0
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 1
m_MipBias: 0
m_WrapU: 1
m_WrapV: 1
m_WrapW: 1
m_Dimension: 2
m_VolumeDepth: 1
m_Material: {fileID: 2100000, guid: 07f024bdcd70166408ae4c312452248a, type: 2}
m_InitSource: 0
m_InitMaterial: {fileID: 0}
m_InitColor: {r: 1, g: 1, b: 1, a: 1}
m_InitTexture: {fileID: 0}
m_UpdateMode: 1
m_InitializationMode: 1
m_UpdateZoneSpace: 0
m_CurrentUpdateZoneSpace: 0
m_UpdateZones: []
m_UpdatePeriod: 0
m_ShaderPass: 0
m_CubemapFaceMask: 4294967295
m_DoubleBuffered: 0
m_WrapUpdateZones: 0

9
MaterialGraphProject/Assets/Florent/2PassCustomTexture.asset.meta


fileFormatVersion: 2
guid: 4175b1311e786fc4bbbe7ba7f8bdc702
timeCreated: 1495744795
licenseType: Pro
NativeFormatImporter:
mainObjectFileID: 8600000
userData:
assetBundleName:
assetBundleVariant:

9
MaterialGraphProject/Assets/Florent/FirstPass.meta


fileFormatVersion: 2
guid: eb36f875e27437d46b5af42ea2c10b92
folderAsset: yes
timeCreated: 1495744160
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

75
MaterialGraphProject/Assets/Florent/MaterialWith2PassTexture.mat


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: MaterialWith2PassTexture
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 8600000, guid: 4175b1311e786fc4bbbe7ba7f8bdc702, type: 2}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

9
MaterialGraphProject/Assets/Florent/MaterialWith2PassTexture.mat.meta


fileFormatVersion: 2
guid: 498f1d2437c6bb84d8b82d451d56eaee
timeCreated: 1495744861
licenseType: Pro
NativeFormatImporter:
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

25
MaterialGraphProject/Assets/Florent/UnityEngine.MaterialGraph.ExportTextureMasterNode71166862-083a-4792-8c3a-4111b9dd9d37.mat


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UnityEngine.MaterialGraph.ExportTextureMasterNode71166862-083a-4792-8c3a-4111b9dd9d37
m_Shader: {fileID: 4800000, guid: 9de4796ffebd15d4a9d6e044a172fe49, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- Texture_339414d4_3f08_4a60_b7de_60b5078454cd_Uniform:
m_Texture: {fileID: 8600000, guid: 3d2f7c217d996304986bdb68379c189e, type: 2}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats: []
m_Colors: []

9
MaterialGraphProject/Assets/Florent/UnityEngine.MaterialGraph.ExportTextureMasterNode71166862-083a-4792-8c3a-4111b9dd9d37.mat.meta


fileFormatVersion: 2
guid: 07f024bdcd70166408ae4c312452248a
timeCreated: 1495744826
licenseType: Pro
NativeFormatImporter:
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

57
MaterialGraphProject/Assets/NewNodes/WIP/AACheckerBoardNode.cs


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

12
MaterialGraphProject/Assets/NewNodes/WIP/AACheckerBoardNode.cs.meta


fileFormatVersion: 2
guid: 7c311b074714f8d468c9bfbf8f91619d
timeCreated: 1495731579
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

562
MaterialGraphProject/Assets/NewNodes/WIP/AnyNode.cs


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

12
MaterialGraphProject/Assets/NewNodes/WIP/AnyNode.cs.meta


fileFormatVersion: 2
guid: 38b06780b4d2b274b91e1c2c5627f95d
timeCreated: 1495627163
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

52
MaterialGraphProject/Assets/NewNodes/WIP/RadialShearNode.cs


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

12
MaterialGraphProject/Assets/NewNodes/WIP/RadialShearNode.cs.meta


fileFormatVersion: 2
guid: 568baa0401e6eee42a35609013ee8100
timeCreated: 1495728068
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

49
MaterialGraphProject/Assets/NewNodes/WIP/ScaleOffsetNode.cs


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

12
MaterialGraphProject/Assets/NewNodes/WIP/ScaleOffsetNode.cs.meta


fileFormatVersion: 2
guid: 28273174b61bbd246b556e236deb7556
timeCreated: 1495726779
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

52
MaterialGraphProject/Assets/NewNodes/WIP/SphereWarpNode.cs


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

12
MaterialGraphProject/Assets/NewNodes/WIP/SphereWarpNode.cs.meta


fileFormatVersion: 2
guid: dfd538e33eb01974fad49a2533f8cff8
timeCreated: 1495729511
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

247
MaterialGraphProject/Assets/TestAssets/BW_logo.png

之前 之后
宽度: 256  |  高度: 256  |  大小: 36 KiB

84
MaterialGraphProject/Assets/TestAssets/BW_logo.png.meta


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:

110
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Presenters/AnyNodePresenter.cs


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

12
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Presenters/AnyNodePresenter.cs.meta


fileFormatVersion: 2
guid: ce4472789956d684f89df3578d7d1d6d
timeCreated: 1495707441
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

35
MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/Input/SceneData/CameraDirNode.cs


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

8
MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/Input/SceneData/CameraDirNode.cs.meta


fileFormatVersion: 2
guid: dd27728b9ce314209beef46e595204c5
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

36
MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/Input/SceneData/CameraPosNode.cs


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

8
MaterialGraphProject/Assets/UnityShaderEditor/Runtime/Nodes/Input/SceneData/CameraPosNode.cs.meta


fileFormatVersion: 2
guid: 27a1751acacc54e278090fb991699a90
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:

1
MaterialGraphProject/Assets/_MingWai/Gradient.ShaderGraph
文件差异内容过多而无法显示
查看文件

9
MaterialGraphProject/Assets/_MingWai/Gradient.ShaderGraph.meta


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
文件差异内容过多而无法显示
查看文件

9
MaterialGraphProject/Assets/_MingWai/Gradient_Texture.ShaderGraph.meta


fileFormatVersion: 2
guid: ff2b03d7feb67a145835ad8adae9e0ad
timeCreated: 1495742113
licenseType: Pro
ScriptedImporter:
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}

75
MaterialGraphProject/Assets/Florent/FirstPass/AnimatedMaterial.mat


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: AnimatedMaterial
m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 8600000, guid: 3d2f7c217d996304986bdb68379c189e, type: 2}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats:
- _BumpScale: 1
- _Cutoff: 0.5
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _GlossMapScale: 1
- _Glossiness: 0.5
- _GlossyReflections: 1
- _Metallic: 0
- _Mode: 0
- _OcclusionStrength: 1
- _Parallax: 0.02
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _UVSec: 0
- _ZWrite: 1
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}

9
MaterialGraphProject/Assets/Florent/FirstPass/AnimatedMaterial.mat.meta


fileFormatVersion: 2
guid: 1e99b83ff341d5b4f8a53e7ecb2a8ed9
timeCreated: 1495742381
licenseType: Pro
NativeFormatImporter:
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

44
MaterialGraphProject/Assets/Florent/FirstPass/CustomTexture.asset


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!86 &8600000
CustomRenderTexture:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: CustomTexture
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_Width: 256
m_Height: 256
m_AntiAliasing: 1
m_DepthFormat: 0
m_ColorFormat: 0
m_MipMap: 0
m_GenerateMips: 1
m_SRGB: 0
m_TextureSettings:
serializedVersion: 2
m_FilterMode: 1
m_Aniso: 1
m_MipBias: 0
m_WrapU: 1
m_WrapV: 1
m_WrapW: 1
m_Dimension: 2
m_VolumeDepth: 1
m_Material: {fileID: 2100000, guid: a04cf3d84ac9f56498f2ac8b907a5fa4, type: 2}
m_InitSource: 0
m_InitMaterial: {fileID: 0}
m_InitColor: {r: 1, g: 1, b: 1, a: 1}
m_InitTexture: {fileID: 0}
m_UpdateMode: 1
m_InitializationMode: 1
m_UpdateZoneSpace: 0
m_CurrentUpdateZoneSpace: 0
m_UpdateZones: []
m_UpdatePeriod: 0
m_ShaderPass: 0
m_CubemapFaceMask: 4294967295
m_DoubleBuffered: 0
m_WrapUpdateZones: 0

9
MaterialGraphProject/Assets/Florent/FirstPass/CustomTexture.asset.meta


fileFormatVersion: 2
guid: 3d2f7c217d996304986bdb68379c189e
timeCreated: 1495741994
licenseType: Pro
NativeFormatImporter:
mainObjectFileID: 8600000
userData:
assetBundleName:
assetBundleVariant:

861
MaterialGraphProject/Assets/Florent/FirstPass/New Scene.unity


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 8
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 0
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 10304, guid: 0000000000000000f000000000000000, type: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 11
m_GIWorkflowMode: 1
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_TemporalCoherenceThreshold: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 1
m_EnableRealtimeLightmaps: 1
m_LightmapEditorSettings:
serializedVersion: 9
m_Resolution: 2
m_BakeResolution: 40
m_TextureWidth: 1024
m_TextureHeight: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_FinalGather: 0
m_FinalGatherFiltering: 1
m_FinalGatherRayCount: 256
m_ReflectionCompression: 2
m_MixedBakeMode: 2
m_BakeBackend: 0
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 500
m_PVRBounces: 2
m_PVRFiltering: 0
m_PVRFilteringMode: 1
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousColorSigma: 1
m_PVRFilteringAtrousNormalSigma: 1
m_PVRFilteringAtrousPositionSigma: 1
m_LightingDataAsset: {fileID: 0}
m_UseShadowmask: 1
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 2
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &213559196
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 213559200}
- component: {fileID: 213559199}
- component: {fileID: 213559198}
- component: {fileID: 213559197}
m_Layer: 0
m_Name: Cube (4)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!23 &213559197
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 213559196}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: 1e99b83ff341d5b4f8a53e7ecb2a8ed9, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!65 &213559198
BoxCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 213559196}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!33 &213559199
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 213559196}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &213559200
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 213559196}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 1.08, y: 2.64, z: -2.570777}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &262669736
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 262669740}
- component: {fileID: 262669739}
- component: {fileID: 262669738}
- component: {fileID: 262669737}
m_Layer: 0
m_Name: Cube (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!23 &262669737
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 262669736}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: 498f1d2437c6bb84d8b82d451d56eaee, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!65 &262669738
BoxCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 262669736}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!33 &262669739
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 262669736}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &262669740
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 262669736}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 1.74, y: 1.17, z: -2.570777}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &267604125
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 267604129}
- component: {fileID: 267604128}
- component: {fileID: 267604127}
- component: {fileID: 267604126}
m_Layer: 0
m_Name: Cube (6)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!23 &267604126
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 267604125}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: 1e99b83ff341d5b4f8a53e7ecb2a8ed9, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!65 &267604127
BoxCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 267604125}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!33 &267604128
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 267604125}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &267604129
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 267604125}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -0.81, y: -0.51, z: -2.570777}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1240285616
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1240285620}
- component: {fileID: 1240285619}
- component: {fileID: 1240285618}
- component: {fileID: 1240285617}
m_Layer: 0
m_Name: Cube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!23 &1240285617
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1240285616}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: 1e99b83ff341d5b4f8a53e7ecb2a8ed9, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!65 &1240285618
BoxCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1240285616}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!33 &1240285619
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1240285616}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &1240285620
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1240285616}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.15, y: 1.17, z: -2.570777}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1251357087
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1251357091}
- component: {fileID: 1251357090}
- component: {fileID: 1251357089}
- component: {fileID: 1251357088}
m_Layer: 0
m_Name: Cube (3)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!23 &1251357088
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1251357087}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: 1e99b83ff341d5b4f8a53e7ecb2a8ed9, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!65 &1251357089
BoxCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1251357087}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!33 &1251357090
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1251357087}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &1251357091
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1251357087}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -0.72, y: 2.65, z: -2.570777}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1257845278
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1257845283}
- component: {fileID: 1257845282}
- component: {fileID: 1257845281}
- component: {fileID: 1257845280}
- component: {fileID: 1257845279}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &1257845279
AudioListener:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1257845278}
m_Enabled: 1
--- !u!124 &1257845280
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1257845278}
m_Enabled: 1
--- !u!92 &1257845281
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1257845278}
m_Enabled: 1
--- !u!20 &1257845282
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1257845278}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
m_StereoMirrorMode: 0
--- !u!4 &1257845283
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1257845278}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1609885672
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1609885676}
- component: {fileID: 1609885675}
- component: {fileID: 1609885674}
- component: {fileID: 1609885673}
m_Layer: 0
m_Name: Cube (2)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!23 &1609885673
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1609885672}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: 498f1d2437c6bb84d8b82d451d56eaee, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!65 &1609885674
BoxCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1609885672}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!33 &1609885675
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1609885672}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &1609885676
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1609885672}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -1.55, y: 1.2, z: -2.570777}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1701227851
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1701227855}
- component: {fileID: 1701227854}
- component: {fileID: 1701227853}
- component: {fileID: 1701227852}
m_Layer: 0
m_Name: Cube (5)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!23 &1701227852
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1701227851}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: 1e99b83ff341d5b4f8a53e7ecb2a8ed9, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!65 &1701227853
BoxCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1701227851}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!33 &1701227854
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1701227851}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &1701227855
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1701227851}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.93, y: -0.43, z: -2.570777}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1950489749
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1950489751}
- component: {fileID: 1950489750}
m_Layer: 0
m_Name: Directional Light
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!108 &1950489750
Light:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1950489749}
m_Enabled: 1
serializedVersion: 8
m_Type: 1
m_Color: {r: 1, g: 0.95686275, b: 0.8392157, a: 1}
m_Intensity: 1
m_Range: 10
m_SpotAngle: 30
m_CookieSize: 10
m_Shadows:
m_Type: 2
m_Resolution: -1
m_CustomResolution: -1
m_Strength: 1
m_Bias: 0.05
m_NormalBias: 0.4
m_NearPlane: 0.2
m_Cookie: {fileID: 0}
m_DrawHalo: 0
m_Flare: {fileID: 0}
m_RenderMode: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_Lightmapping: 4
m_AreaSize: {x: 1, y: 1}
m_BounceIntensity: 1
m_FalloffTable:
m_Table[0]: 0
m_Table[1]: 0
m_Table[2]: 0
m_Table[3]: 0
m_Table[4]: 0
m_Table[5]: 0
m_Table[6]: 0
m_Table[7]: 0
m_Table[8]: 0
m_Table[9]: 0
m_Table[10]: 0
m_Table[11]: 0
m_Table[12]: 0
m_ColorTemperature: 6570
m_UseColorTemperature: 0
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!4 &1950489751
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1950489749}
m_LocalRotation: {x: 0.40821788, y: -0.23456968, z: 0.10938163, w: 0.8754261}
m_LocalPosition: {x: 0, y: 3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}

8
MaterialGraphProject/Assets/Florent/FirstPass/New Scene.unity.meta


fileFormatVersion: 2
guid: cf037fe0510459a4d9218aeb3c780b2b
timeCreated: 1495742354
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

1
MaterialGraphProject/Assets/Florent/FirstPass/RealtimeUpdate.ShaderGraph
文件差异内容过多而无法显示
查看文件

9
MaterialGraphProject/Assets/Florent/FirstPass/RealtimeUpdate.ShaderGraph.meta


fileFormatVersion: 2
guid: 17691048a8eeabd4baf339beaee72f46
timeCreated: 1495742007
licenseType: Pro
ScriptedImporter:
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}

30
MaterialGraphProject/Assets/Florent/FirstPass/UnityEngine.MaterialGraph.ExportTextureMasterNodeeac16720-baa9-4e44-8ca0-c395445c4ed3.mat


%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 6
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: UnityEngine.MaterialGraph.ExportTextureMasterNodeeac16720-baa9-4e44-8ca0-c395445c4ed3
m_Shader: {fileID: 4800000, guid: 17691048a8eeabd4baf339beaee72f46, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- Texture_7a4ffc17_ec7a_49b8_a833_bdec799dea94_Uniform:
m_Texture: {fileID: 2800000, guid: 5485e2f56028a3c4cb54f5caa167377e, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _Tex:
m_Texture: {fileID: 2800000, guid: 5485e2f56028a3c4cb54f5caa167377e, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Floats: []
m_Colors:
- _Color: {r: 1, g: 1, b: 1, a: 1}

9
MaterialGraphProject/Assets/Florent/FirstPass/UnityEngine.MaterialGraph.ExportTextureMasterNodeeac16720-baa9-4e44-8ca0-c395445c4ed3.mat.meta


fileFormatVersion: 2
guid: a04cf3d84ac9f56498f2ac8b907a5fa4
timeCreated: 1495742291
licenseType: Pro
NativeFormatImporter:
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

1
MaterialGraphProject/Assets/Florent/GeneratedTexture.meta


guid: fbb15485f0112484eaa58e88a4ac393f
正在加载...
取消
保存