浏览代码

Merge with master

/main
Martin Thorzen 7 年前
当前提交
7b5ca064
共有 67 个文件被更改,包括 624 次插入1258 次删除
  1. 2
      .gitignore
  2. 3
      MaterialGraphProject/Assets/UnityShaderEditor/.npmignore
  3. 31
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/ScreenPositionMaterialSlot.cs
  4. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/Vector2ShaderProperty.cs
  5. 5
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/Vector3ShaderProperty.cs
  6. 5
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/Vector4ShaderProperty.cs
  7. 5
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/VectorShaderProperty.cs
  8. 7
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/HDPipeline/HDUnlitSubShader.cs
  9. 3
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Interfaces/Graph/INode.cs
  10. 31
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/LightweightPipeline/LightWeightPBRSubShader.cs
  11. 16
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/LightweightPipeline/LightWeightUnlitSubShader.cs
  12. 48
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/MasterNodes/PBRMasterNode.cs
  13. 46
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/MasterNodes/UnlitMasterNode.cs
  14. 25
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/AbstractMaterialNode.cs
  15. 8
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Artistic/Adjustment/ReplaceColorNode.cs
  16. 42
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Artistic/Blend/BlendNode.cs
  17. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Artistic/Filter/DitherNode.cs
  18. 9
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Artistic/Mask/ColorMaskNode.cs
  19. 2
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/CodeFunctionNode.cs
  20. 1
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/IMasterNode.cs
  21. 30
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Geometry/ScreenPositionNode.cs
  22. 2
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Geometry/UVNode.cs
  23. 114
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/MasterNode.cs
  24. 5
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Derivative/DDXNode.cs
  25. 5
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Derivative/DDXYNode.cs
  26. 5
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Derivative/DDYNode.cs
  27. 5
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Interpolation/InverseLerpNode.cs
  28. 5
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Interpolation/LerpNode.cs
  29. 13
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Interpolation/SmoothstepNode.cs
  30. 5
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Range/ClampNode.cs
  31. 5
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Range/FractionNode.cs
  32. 5
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Range/MaximumNode.cs
  33. 5
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Range/MinimumNode.cs
  34. 5
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Range/OneMinusNode.cs
  35. 5
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Range/RandomRangeNode.cs
  36. 5
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Range/RemapNode.cs
  37. 5
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Range/SaturateNode.cs
  38. 6
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Round/StepNode.cs
  39. 38
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Util/ShaderGenerator.cs
  40. 2
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Inspector/GraphInspectorView.cs
  41. 17
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Inspector/MasterPreviewView.cs
  42. 10
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/PreviewManager.cs
  43. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/GraphEditorView.cs
  44. 4
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/MaterialNodeView.cs
  45. 7
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/Styles/MaterialGraph.uss
  46. 10
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/MasterNodes/AlphaMode.cs
  47. 11
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/MasterNodes/AlphaMode.cs.meta
  48. 7
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/MasterNodes/IPBRSubShader.cs
  49. 11
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/MasterNodes/IPBRSubShader.cs.meta
  50. 8
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/MasterNodes/ISubShader.cs
  51. 11
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/MasterNodes/ISubShader.cs.meta
  52. 7
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/MasterNodes/IUnlitSubShader.cs
  53. 12
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/GuidEncoder.cs
  54. 11
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/GuidEncoder.cs.meta
  55. 28
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Util/ScreenSpaceType.cs
  56. 11
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Util/ScreenSpaceType.cs.meta
  57. 31
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/Slots/ScreenPositionSlotControlView.cs
  58. 11
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/Slots/ScreenPositionSlotControlView.cs.meta
  59. 49
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Templates/lightweightUnlitExtraPasses.template
  60. 7
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Templates/lightweightUnlitExtraPasses.template.meta
  61. 25
      build.py
  62. 8
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/HDPipeline/IUnlitSubShader.cs
  63. 9
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/LightweightPipeline/ShaderTest.unity.meta
  64. 10
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/LightweightPipeline/Materials.meta
  65. 996
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/LightweightPipeline/ShaderTest.unity
  66. 0
      /MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/MasterNodes/IUnlitSubShader.cs.meta

2
.gitignore


artifacts/**
build/**
MaterialGraphProject/.vs
MaterialGraphProject/.vscode
MaterialGraphProject/Library

3
MaterialGraphProject/Assets/UnityShaderEditor/.npmignore


artifacts/**
build/**
.npmignore

31
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/ScreenPositionMaterialSlot.cs


using System;
using UnityEditor.Graphing;
using UnityEditor.ShaderGraph.Drawing.Slots;
using UnityEngine.Experimental.UIElements;
namespace UnityEditor.ShaderGraph
{

[SerializeField]
ScreenSpaceType m_ScreenSpaceType;
public ScreenSpaceType screenSpaceType
{
get { return m_ScreenSpaceType; }
set { m_ScreenSpaceType = value; }
}
public ScreenPositionMaterialSlot(int slotId, string displayName, string shaderOutputName,
public ScreenPositionMaterialSlot(int slotId, string displayName, string shaderOutputName, ScreenSpaceType screenSpaceType,
{}
{
this.screenSpaceType = screenSpaceType;
}
public override VisualElement InstantiateControl()
{
return new ScreenPositionSlotControlView(this);
}
return string.Format("IN.{0}", ShaderGeneratorNames.ScreenPosition);
return m_ScreenSpaceType.ToValueAsVariable();
}
public override void CopyValuesFrom(MaterialSlot foundSlot)
{
var slot = foundSlot as ScreenPositionMaterialSlot;
if (slot != null)
screenSpaceType = slot.screenSpaceType;
}
}
}

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


get { return new Vector4(value.x, value.y, 0, 0); }
}
public override string GetPropertyDeclarationString(string delimiter = ";")
{
return string.Format("float2 {0}{1}", referenceName, delimiter);
}
public override PreviewProperty GetPreviewMaterialProperty()
{

5
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/Vector3ShaderProperty.cs


get { return new Vector4(value.x, value.y, value.z, 0); }
}
public override string GetPropertyDeclarationString(string delimiter = ";")
{
return string.Format("float3 {0}{1}", referenceName, delimiter);
}
public override PreviewProperty GetPreviewMaterialProperty()
{
return new PreviewProperty(PropertyType.Vector3)

5
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/Vector4ShaderProperty.cs


get { return value; }
}
public override string GetPropertyDeclarationString(string delimiter = ";")
{
return string.Format("float4 {0}{1}", referenceName, delimiter);
}
public override PreviewProperty GetPreviewMaterialProperty()
{
return new PreviewProperty(PropertyType.Vector4)

5
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Graphs/VectorShaderProperty.cs


result.Append(")");
return result.ToString();
}
public override string GetPropertyDeclarationString(string delimiter = ";")
{
return string.Format("float4 {0}{1}", referenceName, delimiter);
}
}
}

7
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/HDPipeline/HDUnlitSubShader.cs


using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using UnityEditor.Graphing;

[Serializable]
public class HDUnlitSubShader : IUnlitSubShader
{
struct Pass

return resultPass;
}
public string GetSubshader(UnlitMasterNode masterNode, GenerationMode mode)
public string GetSubshader(IMasterNode inMasterNode, GenerationMode mode)
var masterNode = inMasterNode as UnlitMasterNode;
var subShader = new ShaderGenerator();
subShader.AddShaderChunk("SubShader", true);
subShader.AddShaderChunk("{", true);

3
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Interfaces/Graph/INode.cs


public interface INode
{
OnNodeModified onModified { get; set; }
void RegisterCallback(OnNodeModified callback);
void UnregisterCallback(OnNodeModified callback);
void Dirty(ModificationScope scope);
IGraph owner { get; set; }
Guid guid { get; }

31
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/LightweightPipeline/LightWeightPBRSubShader.cs


using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;

{
public class LightWeightPBRSubShader
[Serializable]
public class LightWeightPBRSubShader : IPBRSubShader
Pass m_ForwardPassMetallic = new Pass()
struct Pass
{
public string Name;
public List<int> VertexShaderSlots;
public List<int> PixelShaderSlots;
}
Pass m_ForwardPassMetallic = new Pass
PixelShaderSlots = new List<int>()
PixelShaderSlots = new List<int>
{
PBRMasterNode.AlbedoSlotId,
PBRMasterNode.NormalSlotId,

PBRMasterNode.AlphaThresholdSlotId
}
};
struct Pass
{
public string Name;
public List<int> VertexShaderSlots;
public List<int> PixelShaderSlots;
}
Pass m_ForwardPassSpecular = new Pass()
{
Name = "LightweightForward",

return resultPass;
}
public IEnumerable<string> GetSubshader(PBRMasterNode masterNode, GenerationMode mode)
public string GetSubshader(IMasterNode inMasterNode, GenerationMode mode)
var masterNode = inMasterNode as PBRMasterNode;
var subShader = new ShaderGenerator();
subShader.AddShaderChunk("SubShader", true);
subShader.AddShaderChunk("{", true);

var materialOptions = MasterNode.GetMaterialOptionsFromAlphaMode(masterNode.alphaMode);
var materialOptions = ShaderGenerator.GetMaterialOptionsFromAlphaMode(masterNode.alphaMode);
var tagsVisitor = new ShaderGenerator();
materialOptions.GetTags(tagsVisitor);
subShader.AddShaderChunk(tagsVisitor.GetShaderString(0), true);

subShader.Deindent();
subShader.AddShaderChunk("}", true);
return new[] { subShader.GetShaderString(0) };
return subShader.GetShaderString(0);
}
}
}

16
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/LightweightPipeline/LightWeightUnlitSubShader.cs


using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;

{
[Serializable]
Pass m_UnlitPass = new Pass()
Pass m_UnlitPass = new Pass
PixelShaderSlots = new List<int>()
PixelShaderSlots = new List<int>
{
UnlitMasterNode.ColorSlotId,
UnlitMasterNode.AlphaSlotId,

return resultPass;
}
public string GetSubshader(UnlitMasterNode masterNode, GenerationMode mode)
public string GetSubshader(IMasterNode inMasterNode, GenerationMode mode)
var masterNode = inMasterNode as UnlitMasterNode;
var subShader = new ShaderGenerator();
subShader.AddShaderChunk("SubShader", true);
subShader.AddShaderChunk("{", true);

var materialOptions = MasterNode.GetMaterialOptionsFromAlphaMode(masterNode.alphaMode);
var materialOptions = ShaderGenerator.GetMaterialOptionsFromAlphaMode(masterNode.alphaMode);
var tagsVisitor = new ShaderGenerator();
materialOptions.GetTags(tagsVisitor);
subShader.AddShaderChunk(tagsVisitor.GetShaderString(0), true);

mode,
materialOptions),
true);
var extraPassesTemplateLocation = ShaderGenerator.GetTemplatePath("lightweightUnlitExtraPasses.template");
if (File.Exists(extraPassesTemplateLocation))
subShader.AddShaderChunk(File.ReadAllText(extraPassesTemplateLocation), true);
subShader.Deindent();
subShader.AddShaderChunk("}", true);

48
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/MasterNodes/PBRMasterNode.cs


using System;
using System.Collections.Generic;
using System.Linq;
using UnityEditor.Graphing;
using UnityEditor.ShaderGraph.Drawing.Controls;

{
public enum AlphaMode
{
Opaque,
AlphaBlend,
AdditiveBlend
}
public class PBRMasterNode : MasterNode
public class PBRMasterNode : MasterNode<IPBRSubShader>
{
public const string AlbedoSlotName = "Albedo";
public const string NormalSlotName = "Normal";

AlphaSlotId,
AlphaThresholdSlotId
}, true);
}
public override string GetShader(GenerationMode mode, string outputName, out List<PropertyCollector.TextureInfo> configuredTextures)
{
var activeNodeList = ListPool<INode>.Get();
NodeUtils.DepthFirstCollectNodesFromNode(activeNodeList, this);
var shaderProperties = new PropertyCollector();
var abstractMaterialGraph = owner as AbstractMaterialGraph;
if (abstractMaterialGraph != null)
abstractMaterialGraph.CollectShaderProperties(shaderProperties, mode);
foreach (var activeNode in activeNodeList.OfType<AbstractMaterialNode>())
activeNode.CollectShaderProperties(shaderProperties, mode);
var finalShader = new ShaderGenerator();
finalShader.AddShaderChunk(string.Format(@"Shader ""{0}""", outputName), false);
finalShader.AddShaderChunk("{", false);
finalShader.Indent();
finalShader.AddShaderChunk("Properties", false);
finalShader.AddShaderChunk("{", false);
finalShader.Indent();
finalShader.AddShaderChunk(shaderProperties.GetPropertiesBlock(2), false);
finalShader.Deindent();
finalShader.AddShaderChunk("}", false);
var lwSub = new LightWeightPBRSubShader();
foreach (var subshader in lwSub.GetSubshader(this, mode))
finalShader.AddShaderChunk(subshader, true);
finalShader.Deindent();
finalShader.AddShaderChunk("}", false);
configuredTextures = shaderProperties.GetConfiguredTexutres();
return finalShader.GetShaderString(0);
if (!subShaders.Any())
AddSubShader(new LightWeightPBRSubShader());
}
}
}

46
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/MasterNodes/UnlitMasterNode.cs


using System;
using System.Collections.Generic;
using System.Linq;
using UnityEditor.Graphing;
using UnityEditor.ShaderGraph.Drawing.Controls;

{
[Serializable]
[Title("Master", "Unlit")]
public class UnlitMasterNode : MasterNode
public class UnlitMasterNode : MasterNode<IUnlitSubShader>
{
public const string ColorSlotName = "Color";
public const string AlphaSlotName = "Alpha";

public const int AlphaSlotId = 7;
public const int AlphaThresholdSlotId = 8;
[SerializeField]
private AlphaMode m_AlphaMode;

AlphaSlotId,
AlphaThresholdSlotId
});
}
public override string GetShader(GenerationMode mode, string outputName, out List<PropertyCollector.TextureInfo> configuredTextures)
{
var activeNodeList = ListPool<INode>.Get();
NodeUtils.DepthFirstCollectNodesFromNode(activeNodeList, this);
var shaderProperties = new PropertyCollector();
var abstractMaterialGraph = owner as AbstractMaterialGraph;
if (abstractMaterialGraph != null)
abstractMaterialGraph.CollectShaderProperties(shaderProperties, mode);
foreach (var activeNode in activeNodeList.OfType<AbstractMaterialNode>())
activeNode.CollectShaderProperties(shaderProperties, mode);
var finalShader = new ShaderGenerator();
finalShader.AddShaderChunk(string.Format(@"Shader ""{0}""", outputName), false);
finalShader.AddShaderChunk("{", false);
finalShader.Indent();
finalShader.AddShaderChunk("Properties", false);
finalShader.AddShaderChunk("{", false);
finalShader.Indent();
finalShader.AddShaderChunk(shaderProperties.GetPropertiesBlock(2), false);
finalShader.Deindent();
finalShader.AddShaderChunk("}", false);
var lwSub = new LightWeightUnlitSubShader();
finalShader.AddShaderChunk(lwSub.GetSubshader(this, mode), true);
//Disable HD for now as there is no mapping
// for many inputs like worldSpaceNormal and similar
/*var hdSub = new HDUnlitSubShader();
finalShader.AddShaderChunk(hdSub.GetSubshader(this, mode), true);*/
finalShader.Deindent();
finalShader.AddShaderChunk("}", false);
configuredTextures = shaderProperties.GetConfiguredTexutres();
return finalShader.GetShaderString(0);
if (!subShaders.Any())
AddSubShader(new LightWeightUnlitSubShader());
}
}
}

25
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/AbstractMaterialNode.cs


namespace UnityEditor.ShaderGraph
{
public static class GuidEncoder
{
public static string Encode(Guid guid)
{
string enc = Convert.ToBase64String(guid.ToByteArray());
return String.Format("{0:X}", enc.GetHashCode());
}
}
[Serializable]
public abstract class AbstractMaterialNode : INode, ISerializationCallbackReceiver, IGenerateProperties
{

public IGraph owner { get; set; }
public OnNodeModified onModified { get; set; }
OnNodeModified m_OnModified;
public void RegisterCallback(OnNodeModified callback)
{
m_OnModified += callback;
}
public void UnregisterCallback(OnNodeModified callback)
{
m_OnModified -= callback;
}
if (onModified != null)
onModified(this, scope);
if (m_OnModified != null)
m_OnModified(this, scope);
}
public Guid guid

8
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Artistic/Adjustment/ReplaceColorNode.cs


[Slot(1, Binding.None)] ColorRGB From,
[Slot(2, Binding.None)] ColorRGB To,
[Slot(3, Binding.None)] Vector1 Range,
[Slot(5, Binding.None)] Vector1 Fuzziness,
Out = Vector2.zero;
Out = Vector3.zero;
{precision}3 col = In;
if(Distance <= Range)
col = To;
Out = col;
Out = lerp(To, In, saturate((Distance - Range) / max(Fuzziness, 1e-5f)));
}";
}
}

42
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Artistic/Blend/BlendNode.cs


static string Unity_Blend_Burn(
[Slot(0, Binding.None)] DynamicDimensionVector Base,
[Slot(1, Binding.None)] DynamicDimensionVector Blend,
[Slot(3, Binding.None, 1, 1, 1, 1)] Vector1 Opacity,
[Slot(2, Binding.None)] out DynamicDimensionVector Out)
{
return

Out = lerp(Base, Out, Opacity);
}";
}

[Slot(3, Binding.None, 1, 1, 1, 1)] Vector1 Opacity,
[Slot(2, Binding.None)] out DynamicDimensionVector Out)
{
return

Out = lerp(Base, Out, Opacity);
}";
}

[Slot(3, Binding.None, 1, 1, 1, 1)] Vector1 Opacity,
[Slot(2, Binding.None)] out DynamicDimensionVector Out)
{
return

Out = lerp(Base, Out, Opacity);
}";
}

[Slot(3, Binding.None, 1, 1, 1, 1)] Vector1 Opacity,
[Slot(2, Binding.None)] out DynamicDimensionVector Out)
{
return

Out = lerp(Base, Out, Opacity);
}";
}

[Slot(3, Binding.None, 1, 1, 1, 1)] Vector1 Opacity,
[Slot(2, Binding.None)] out DynamicDimensionVector Out)
{
return

Out = lerp(Base, Out, Opacity);
}";
}

[Slot(3, Binding.None, 1, 1, 1, 1)] Vector1 Opacity,
[Slot(2, Binding.None)] out DynamicDimensionVector Out)
{
return

Out = lerp(Base, Out, Opacity);
}";
}

[Slot(3, Binding.None, 1, 1, 1, 1)] Vector1 Opacity,
[Slot(2, Binding.None)] out DynamicDimensionVector Out)
{
return

{precision}{slot2dimension} result2 = 2.0 * Base * Blend;
{precision}{slot2dimension} zeroOrOne = step(Blend, 0.5);
Out = result2 * zeroOrOne + (1 - zeroOrOne) * result1;
Out = lerp(Base, Out, Opacity);
}";
}

[Slot(3, Binding.None, 1, 1, 1, 1)] Vector1 Opacity,
[Slot(2, Binding.None)] out DynamicDimensionVector Out)
{
return

Out = lerp(Base, Out, Opacity);
}";
}

[Slot(3, Binding.None, 1, 1, 1, 1)] Vector1 Opacity,
[Slot(2, Binding.None)] out DynamicDimensionVector Out)
{
return

Out = lerp(Base, Out, Opacity);
}";
}

[Slot(3, Binding.None, 1, 1, 1, 1)] Vector1 Opacity,
[Slot(2, Binding.None)] out DynamicDimensionVector Out)
{
return

Out = lerp(Base, Out, Opacity);
}";
}

[Slot(3, Binding.None, 1, 1, 1, 1)] Vector1 Opacity,
[Slot(2, Binding.None)] out DynamicDimensionVector Out)
{
return

Out = lerp(Base, Out, Opacity);
}";
}

[Slot(3, Binding.None, 1, 1, 1, 1)] Vector1 Opacity,
[Slot(2, Binding.None)] out DynamicDimensionVector Out)
{
return

Out = lerp(Base, Out, Opacity);
}";
}

[Slot(3, Binding.None, 1, 1, 1, 1)] Vector1 Opacity,
[Slot(2, Binding.None)] out DynamicDimensionVector Out)
{
return

Out = lerp(Base, Out, Opacity);
}";
}

[Slot(3, Binding.None, 1, 1, 1, 1)] Vector1 Opacity,
[Slot(2, Binding.None)] out DynamicDimensionVector Out)
{
return

Out = lerp(Base, Out, Opacity);
}";
}

[Slot(3, Binding.None, 1, 1, 1, 1)] Vector1 Opacity,
[Slot(2, Binding.None)] out DynamicDimensionVector Out)
{
return

Out = lerp(Base, Out, Opacity);
}";
}

[Slot(3, Binding.None, 1, 1, 1, 1)] Vector1 Opacity,
[Slot(2, Binding.None)] out DynamicDimensionVector Out)
{
return

Out = lerp(Base, Out, Opacity);
}";
}

[Slot(3, Binding.None, 1, 1, 1, 1)] Vector1 Opacity,
[Slot(2, Binding.None)] out DynamicDimensionVector Out)
{
return

{precision}{slot2dimension} result2 = 2.0 * Base * Blend;
{precision}{slot2dimension} zeroOrOne = step(Base, 0.5);
Out = result2 * zeroOrOne + (1 - zeroOrOne) * result1;
Out = lerp(Base, Out, Opacity);
}
";
}

[Slot(1, Binding.None)] DynamicDimensionVector Blend,
[Slot(3, Binding.None, 1, 1, 1, 1)] Vector1 Opacity,
[Slot(2, Binding.None)] out DynamicDimensionVector Out)
{
return

{precision}{slot2dimension} result1 = check * max(2.0 * (Base - 0.5), Blend);
Out = result1 + (1.0 - check) * min(2.0 * Base, Blend);
Out = lerp(Base, Out, Opacity);
}
";
}

[Slot(1, Binding.None)] DynamicDimensionVector Blend,
[Slot(3, Binding.None, 1, 1, 1, 1)] Vector1 Opacity,
[Slot(2, Binding.None)] out DynamicDimensionVector Out)
{
return

{precision}{slot2dimension} result2 = sqrt(Base) * (2.0 * Blend - 1.0) + 2.0 * Base * (1.0 - Blend);
{precision}{slot2dimension} zeroOrOne = step(0.5, Blend);
Out = result2 * zeroOrOne + (1 - zeroOrOne) * result1;
Out = lerp(Base, Out, Opacity);
}
";
}

[Slot(1, Binding.None)] DynamicDimensionVector Blend,
[Slot(3, Binding.None, 1, 1, 1, 1)] Vector1 Opacity,
[Slot(2, Binding.None)] out DynamicDimensionVector Out)
{
return

{precision}{slot2dimension} result2 = Blend / (2.0 * (1.0 - Base));
{precision}{slot2dimension} zeroOrOne = step(0.5, Base);
Out = result2 * zeroOrOne + (1 - zeroOrOne) * result1;
Out = lerp(Base, Out, Opacity);
}
";
}

[Slot(1, Binding.None)] DynamicDimensionVector Blend,
[Slot(3, Binding.None, 1, 1, 1, 1)] Vector1 Opacity,
[Slot(2, Binding.None)] out DynamicDimensionVector Out)
{
return

Out = lerp(Base, Out, Opacity);
}
";
}

4
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Artistic/Filter/DitherNode.cs


}
static string Unity_Dither(
[Slot(0, Binding.None)] DynamicDimensionVector In,
[Slot(1, Binding.ScreenPosition)] Vector2 UV,
[Slot(1, Binding.ScreenPosition)] Vector2 ScreenPosition,
{precision}2 uv = (UV.xy / UV.w) * _ScreenParams.xy;
{precision}2 uv = ScreenPosition.xy * _ScreenParams.xy;
{precision} DITHER_THRESHOLDS[16] =
{
1.0 / 17.0, 9.0 / 17.0, 3.0 / 17.0, 11.0 / 17.0,

9
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Artistic/Mask/ColorMaskNode.cs


[Slot(0, Binding.None)] Vector3 In,
[Slot(1, Binding.None)] ColorRGB MaskColor,
[Slot(2, Binding.None)] Vector1 Range,
[Slot(3, Binding.None)] out Vector3 Out)
[Slot(4, Binding.None)] Vector1 Fuzziness,
[Slot(3, Binding.None)] out Vector1 Out)
Out = Vector3.zero;
{precision}3 col = {precision}3(0, 0, 0);
if(Distance <= Range)
col = {precision}3(1, 1, 1);
Out = col;
Out = saturate(1 - (Distance - Range) / max(Fuzziness, 1e-5));
}";
}
}

2
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/CodeFunctionNode.cs


case Binding.MeshUV3:
return new UVMaterialSlot(slotId, displayName, shaderOutputName, UVChannel.UV3);
case Binding.ScreenPosition:
return new ScreenPositionMaterialSlot(slotId, displayName, shaderOutputName);
return new ScreenPositionMaterialSlot(slotId, displayName, shaderOutputName, ScreenSpaceType.Default);
case Binding.ObjectSpaceViewDirection:
return new ViewDirectionMaterialSlot(slotId, displayName, shaderOutputName, CoordinateSpace.Object);
case Binding.ViewSpaceViewDirection:

1
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/IMasterNode.cs


{
public interface IMasterNode
{
SurfaceMaterialOptions options { get; }
string GetShader(GenerationMode mode, string name, out List<PropertyCollector.TextureInfo> configuredTextures);
}
}

30
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Geometry/ScreenPositionNode.cs


namespace UnityEditor.ShaderGraph
{
public enum ScreenSpaceType
{
Default,
Raw,
Center,
Tiled
};
[Title("Input", "Geometry", "Screen Position")]
public class ScreenPositionNode : AbstractMaterialNode, IGeneratesBodyCode, IMayRequireScreenPosition
{

public void GenerateNodeCode(ShaderGenerator visitor, GenerationMode generationMode)
{
switch (m_ScreenSpaceType)
{
case ScreenSpaceType.Raw:
visitor.AddShaderChunk(string.Format("{0}4 {1} = IN.{2};", precision, GetVariableNameForSlot(kOutputSlotId),
ShaderGeneratorNames.ScreenPosition), true);
break;
case ScreenSpaceType.Center:
visitor.AddShaderChunk(string.Format("{0}4 {1} = {2};", precision, GetVariableNameForSlot(kOutputSlotId),
string.Format("float4((IN.{0}.xy / IN.{0}.w) * 2 - 1, 0, 0)", ShaderGeneratorNames.ScreenPosition)), true);
break;
case ScreenSpaceType.Tiled:
visitor.AddShaderChunk(string.Format("{0}4 {1} = {2};", precision, GetVariableNameForSlot(kOutputSlotId),
string.Format("float4((IN.{0}.xy / IN.{0}.w) * 2 - 1, 0, 0)", ShaderGeneratorNames.ScreenPosition)), true);
visitor.AddShaderChunk(string.Format("{0} = {1};", GetVariableNameForSlot(kOutputSlotId),
string.Format("frac(float4({0}.x * _ScreenParams.x / _ScreenParams.y, {0}.y, 0, 0))", GetVariableNameForSlot(kOutputSlotId))), true);
break;
default:
visitor.AddShaderChunk(string.Format("{0}4 {1} = {2};", precision, GetVariableNameForSlot(kOutputSlotId),
string.Format("float4(IN.{0}.xy / IN.{0}.w, 0, 0)", ShaderGeneratorNames.ScreenPosition)), true);
break;
}
visitor.AddShaderChunk(string.Format("{0}4 {1} = {2};", precision, GetVariableNameForSlot(kOutputSlotId), m_ScreenSpaceType.ToValueAsVariable()), true);
}
public bool RequiresScreenPosition()

2
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Input/Geometry/UVNode.cs


public override void UpdateNodeAfterDeserialization()
{
AddSlot(new Vector2MaterialSlot(OutputSlotId, kOutputSlotName, kOutputSlotName, SlotType.Output, Vector2.zero));
AddSlot(new Vector4MaterialSlot(OutputSlotId, kOutputSlotName, kOutputSlotName, SlotType.Output, Vector2.zero));
RemoveSlotsNameNotMatching(new[] { OutputSlotId });
}

114
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/MasterNode.cs


using System;
using System.Collections.Generic;
using System.Linq;
using UnityEditor.Graphing;
public abstract class MasterNode : AbstractMaterialNode, IMasterNode
public abstract class MasterNode<T> : AbstractMaterialNode, IMasterNode where T : class, ISubShader
[NonSerialized]
List<T> m_SubShaders = new List<T>();
protected SurfaceMaterialOptions m_MaterialOptions = new SurfaceMaterialOptions();
List<SerializationHelper.JSONSerializedElement> m_SerializableSubShaders = new List<SerializationHelper.JSONSerializedElement>();
public override bool hasPreview
{

get { return PreviewMode.Preview3D; }
}
public SurfaceMaterialOptions options
public Type supportedSubshaderType
{
get { return typeof(T); }
}
public IEnumerable<T> subShaders
get { return m_MaterialOptions; }
get { return m_SubShaders; }
public abstract string GetShader(GenerationMode mode, string name, out List<PropertyCollector.TextureInfo> configuredTextures);
public static SurfaceMaterialOptions GetMaterialOptionsFromAlphaMode(AlphaMode alphaMode)
public void AddSubShader(T subshader)
var materialOptions = new SurfaceMaterialOptions();
switch (alphaMode)
{
case AlphaMode.Opaque:
materialOptions.srcBlend = SurfaceMaterialOptions.BlendMode.One;
materialOptions.dstBlend = SurfaceMaterialOptions.BlendMode.Zero;
materialOptions.cullMode = SurfaceMaterialOptions.CullMode.Back;
materialOptions.zTest = SurfaceMaterialOptions.ZTest.LEqual;
materialOptions.zWrite = SurfaceMaterialOptions.ZWrite.On;
materialOptions.renderQueue = SurfaceMaterialOptions.RenderQueue.Geometry;
materialOptions.renderType = SurfaceMaterialOptions.RenderType.Opaque;
break;
case AlphaMode.AlphaBlend:
materialOptions.srcBlend = SurfaceMaterialOptions.BlendMode.SrcAlpha;
materialOptions.dstBlend = SurfaceMaterialOptions.BlendMode.OneMinusSrcAlpha;
materialOptions.cullMode = SurfaceMaterialOptions.CullMode.Back;
materialOptions.zTest = SurfaceMaterialOptions.ZTest.LEqual;
materialOptions.zWrite = SurfaceMaterialOptions.ZWrite.Off;
materialOptions.renderQueue = SurfaceMaterialOptions.RenderQueue.Transparent;
materialOptions.renderType = SurfaceMaterialOptions.RenderType.Transparent;
break;
case AlphaMode.AdditiveBlend:
materialOptions.srcBlend = SurfaceMaterialOptions.BlendMode.One;
materialOptions.dstBlend = SurfaceMaterialOptions.BlendMode.One;
materialOptions.cullMode = SurfaceMaterialOptions.CullMode.Back;
materialOptions.zTest = SurfaceMaterialOptions.ZTest.LEqual;
materialOptions.zWrite = SurfaceMaterialOptions.ZWrite.Off;
materialOptions.renderQueue = SurfaceMaterialOptions.RenderQueue.Transparent;
materialOptions.renderType = SurfaceMaterialOptions.RenderType.Transparent;
break;
}
return materialOptions;
if (m_SubShaders.Contains(subshader))
return;
m_SubShaders.Add(subshader);
Dirty(ModificationScope.Node);
}
public void RemoveSubShader(T subshader)
{
m_SubShaders.RemoveAll(x => x == subshader);
Dirty(ModificationScope.Node);
}
public string GetShader(GenerationMode mode, string outputName, out List<PropertyCollector.TextureInfo> configuredTextures)
{
var activeNodeList = ListPool<INode>.Get();
NodeUtils.DepthFirstCollectNodesFromNode(activeNodeList, this);
var shaderProperties = new PropertyCollector();
var abstractMaterialGraph = owner as AbstractMaterialGraph;
if (abstractMaterialGraph != null)
abstractMaterialGraph.CollectShaderProperties(shaderProperties, mode);
foreach (var activeNode in activeNodeList.OfType<AbstractMaterialNode>())
activeNode.CollectShaderProperties(shaderProperties, mode);
var finalShader = new ShaderGenerator();
finalShader.AddShaderChunk(string.Format(@"Shader ""{0}""", outputName), false);
finalShader.AddShaderChunk("{", false);
finalShader.Indent();
finalShader.AddShaderChunk("Properties", false);
finalShader.AddShaderChunk("{", false);
finalShader.Indent();
finalShader.AddShaderChunk(shaderProperties.GetPropertiesBlock(2), false);
finalShader.Deindent();
finalShader.AddShaderChunk("}", false);
foreach (var subShader in m_SubShaders)
finalShader.AddShaderChunk(subShader.GetSubshader(this, mode), true);
finalShader.Deindent();
finalShader.AddShaderChunk("}", false);
configuredTextures = shaderProperties.GetConfiguredTexutres();
return finalShader.GetShaderString(0);
}
public override void OnBeforeSerialize()
{
base.OnBeforeSerialize();
m_SerializableSubShaders = SerializationHelper.Serialize<T>(m_SubShaders);
}
public override void OnAfterDeserialize()
{
base.OnAfterDeserialize();
m_SubShaders = SerializationHelper.Deserialize<T>(m_SerializableSubShaders, GraphUtil.GetLegacyTypeRemapping());
m_SerializableSubShaders = null;
}
}
}

5
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Derivative/DDXNode.cs


name = "DDX";
}
public override string documentationURL
{
get { return "https://github.com/Unity-Technologies/ShaderGraph/wiki/DDX-Node"; }
}
protected override MethodInfo GetFunctionToConvert()
{
return GetType().GetMethod("Unity_DDX", BindingFlags.Static | BindingFlags.NonPublic);

5
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Derivative/DDXYNode.cs


name = "DDXY";
}
public override string documentationURL
{
get { return "https://github.com/Unity-Technologies/ShaderGraph/wiki/DDXY-Node"; }
}
protected override MethodInfo GetFunctionToConvert()
{
return GetType().GetMethod("Unity_DDXY", BindingFlags.Static | BindingFlags.NonPublic);

5
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Derivative/DDYNode.cs


name = "DDY";
}
public override string documentationURL
{
get { return "https://github.com/Unity-Technologies/ShaderGraph/wiki/DDY-Node"; }
}
protected override MethodInfo GetFunctionToConvert()
{
return GetType().GetMethod("Unity_DDY", BindingFlags.Static | BindingFlags.NonPublic);

5
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Interpolation/InverseLerpNode.cs


name = "Inverse Lerp";
}
public override string documentationURL
{
get { return "https://github.com/Unity-Technologies/ShaderGraph/wiki/Inverse-Lerp-Node"; }
}
protected override MethodInfo GetFunctionToConvert()
{
return GetType().GetMethod("Unity_InverseLerp", BindingFlags.Static | BindingFlags.NonPublic);

5
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Interpolation/LerpNode.cs


name = "Lerp";
}
public override string documentationURL
{
get { return "https://github.com/Unity-Technologies/ShaderGraph/wiki/Lerp-Node"; }
}
protected override MethodInfo GetFunctionToConvert()
{
return GetType().GetMethod("Unity_Lerp", BindingFlags.Static | BindingFlags.NonPublic);

13
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Interpolation/SmoothstepNode.cs


name = "Smoothstep";
}
public override string documentationURL
{
get { return "https://github.com/Unity-Technologies/ShaderGraph/wiki/Smoothstep-Node"; }
}
protected override MethodInfo GetFunctionToConvert()
{
return GetType().GetMethod("Unity_Smoothstep", BindingFlags.Static | BindingFlags.NonPublic);

[Slot(0, Binding.None, 0, 0, 0, 0)] DynamicDimensionVector A,
[Slot(1, Binding.None, 1, 1, 1, 1)] DynamicDimensionVector B,
[Slot(2, Binding.None, 0, 0, 0, 0)] DynamicDimensionVector T,
[Slot(0, Binding.None, 0, 0, 0, 0)] DynamicDimensionVector Edge1,
[Slot(1, Binding.None, 1, 1, 1, 1)] DynamicDimensionVector Edge2,
[Slot(2, Binding.None, 0, 0, 0, 0)] DynamicDimensionVector In,
Out = smoothstep(A, B, T);
Out = smoothstep(Edge1, Edge2, In);
}";
}
}

5
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Range/ClampNode.cs


name = "Clamp";
}
public override string documentationURL
{
get { return "https://github.com/Unity-Technologies/ShaderGraph/wiki/Clamp-Node"; }
}
protected override MethodInfo GetFunctionToConvert()
{
return GetType().GetMethod("Unity_Clamp", BindingFlags.Static | BindingFlags.NonPublic);

5
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Range/FractionNode.cs


name = "Fraction";
}
public override string documentationURL
{
get { return "https://github.com/Unity-Technologies/ShaderGraph/wiki/Fraction-Node"; }
}
protected override MethodInfo GetFunctionToConvert()
{
return GetType().GetMethod("Unity_Fraction", BindingFlags.Static | BindingFlags.NonPublic);

5
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Range/MaximumNode.cs


name = "Maximum";
}
public override string documentationURL
{
get { return "https://github.com/Unity-Technologies/ShaderGraph/wiki/Maximum-Node"; }
}
protected override MethodInfo GetFunctionToConvert()
{
return GetType().GetMethod("Unity_Maximum", BindingFlags.Static | BindingFlags.NonPublic);

5
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Range/MinimumNode.cs


name = "Minimum";
}
public override string documentationURL
{
get { return "https://github.com/Unity-Technologies/ShaderGraph/wiki/Minimum-Node"; }
}
protected override MethodInfo GetFunctionToConvert()
{
return GetType().GetMethod("Unity_Minimum", BindingFlags.Static | BindingFlags.NonPublic);

5
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Range/OneMinusNode.cs


name = "One Minus";
}
public override string documentationURL
{
get { return "https://github.com/Unity-Technologies/ShaderGraph/wiki/One-Minus-Node"; }
}
protected override MethodInfo GetFunctionToConvert()
{
return GetType().GetMethod("Unity_OneMinus", BindingFlags.Static | BindingFlags.NonPublic);

5
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Range/RandomRangeNode.cs


name = "Random Range";
}
public override string documentationURL
{
get { return "https://github.com/Unity-Technologies/ShaderGraph/wiki/Random-Range-Node"; }
}
protected override MethodInfo GetFunctionToConvert()
{
return GetType().GetMethod("Unity_RandomRange", BindingFlags.Static | BindingFlags.NonPublic);

5
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Range/RemapNode.cs


name = "Remap";
}
public override string documentationURL
{
get { return "https://github.com/Unity-Technologies/ShaderGraph/wiki/Remap-Node"; }
}
protected override MethodInfo GetFunctionToConvert()
{
return GetType().GetMethod("Unity_Remap", BindingFlags.Static | BindingFlags.NonPublic);

5
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Range/SaturateNode.cs


name = "Saturate";
}
public override string documentationURL
{
get { return "https://github.com/Unity-Technologies/ShaderGraph/wiki/Saturate-Node"; }
}
protected override MethodInfo GetFunctionToConvert()
{
return GetType().GetMethod("Unity_Saturate", BindingFlags.Static | BindingFlags.NonPublic);

6
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/Math/Round/StepNode.cs


}
static string Unity_Step(
[Slot(0, Binding.None, 1, 1, 1, 1)] DynamicDimensionVector A,
[Slot(1, Binding.None, 0, 0, 0, 0)] DynamicDimensionVector B,
[Slot(0, Binding.None, 1, 1, 1, 1)] DynamicDimensionVector Edge,
[Slot(1, Binding.None, 0, 0, 0, 0)] DynamicDimensionVector In,
Out = step(A, B);
Out = step(Edge, In);
}
";
}

38
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Util/ShaderGenerator.cs


return res;
}
public static SurfaceMaterialOptions GetMaterialOptionsFromAlphaMode(AlphaMode alphaMode)
{
var materialOptions = new SurfaceMaterialOptions();
switch (alphaMode)
{
case AlphaMode.Opaque:
materialOptions.srcBlend = SurfaceMaterialOptions.BlendMode.One;
materialOptions.dstBlend = SurfaceMaterialOptions.BlendMode.Zero;
materialOptions.cullMode = SurfaceMaterialOptions.CullMode.Back;
materialOptions.zTest = SurfaceMaterialOptions.ZTest.LEqual;
materialOptions.zWrite = SurfaceMaterialOptions.ZWrite.On;
materialOptions.renderQueue = SurfaceMaterialOptions.RenderQueue.Geometry;
materialOptions.renderType = SurfaceMaterialOptions.RenderType.Opaque;
break;
case AlphaMode.AlphaBlend:
materialOptions.srcBlend = SurfaceMaterialOptions.BlendMode.SrcAlpha;
materialOptions.dstBlend = SurfaceMaterialOptions.BlendMode.OneMinusSrcAlpha;
materialOptions.cullMode = SurfaceMaterialOptions.CullMode.Back;
materialOptions.zTest = SurfaceMaterialOptions.ZTest.LEqual;
materialOptions.zWrite = SurfaceMaterialOptions.ZWrite.Off;
materialOptions.renderQueue = SurfaceMaterialOptions.RenderQueue.Transparent;
materialOptions.renderType = SurfaceMaterialOptions.RenderType.Transparent;
break;
case AlphaMode.AdditiveBlend:
materialOptions.srcBlend = SurfaceMaterialOptions.BlendMode.One;
materialOptions.dstBlend = SurfaceMaterialOptions.BlendMode.One;
materialOptions.cullMode = SurfaceMaterialOptions.CullMode.Back;
materialOptions.zTest = SurfaceMaterialOptions.ZTest.LEqual;
materialOptions.zWrite = SurfaceMaterialOptions.ZWrite.Off;
materialOptions.renderQueue = SurfaceMaterialOptions.RenderQueue.Transparent;
materialOptions.renderType = SurfaceMaterialOptions.RenderType.Transparent;
break;
}
return materialOptions;
}
private const string subShaderTemplate = @"
SubShader
{

}
}";
}
}

2
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Inspector/GraphInspectorView.cs


using UnityEditor.Experimental.UIElements;
using UnityEngine;
using UnityEngine.Experimental.UIElements;
using UnityEditor.Experimental.UIElements.GraphView;
namespace UnityEditor.ShaderGraph.Drawing.Inspector
{

PreviewTextureView m_PreviewTextureView;
AbstractMaterialGraph m_Graph;
MasterNode m_MasterNode;
PreviewRenderData m_PreviewRenderHandle;
Vector2 m_PreviewScrollPosition;

17
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Inspector/MasterPreviewView.cs


Vector2 m_PreviewScrollPosition;
ObjectField m_PreviewMeshPicker;
MasterNode m_MasterNode;
IMasterNode m_MasterNode;
Mesh m_PreviousMesh;
List<string> m_DoNotShowPrimitives = new List<string>( new string[] {PrimitiveType.Plane.ToString()});

evt.menu.AppendAction("Custom Mesh", e => ChangeMeshCustom(), ContextualMenu.MenuAction.AlwaysEnabled);
}
MasterNode masterNode
IMasterNode masterNode
{
get { return m_PreviewRenderHandle.shaderData.node as IMasterNode; }
}
void DirtyMasterNode(ModificationScope scope)
get { return m_PreviewRenderHandle.shaderData.node as MasterNode; }
var amn = masterNode as AbstractMaterialNode;
if (amn != null)
amn.Dirty(scope);
}
void OnPreviewChanged()

{
Mesh changedMesh = mesh;
masterNode.Dirty(ModificationScope.Node);
DirtyMasterNode(ModificationScope.Node);
if (m_Graph.previewData.serializedMesh.mesh != changedMesh)
{

Quaternion previewRotation = Quaternion.Euler(m_PreviewScrollPosition.y, 0, 0) * Quaternion.Euler(0, m_PreviewScrollPosition.x, 0);
m_Graph.previewData.rotation = previewRotation;
masterNode.Dirty(ModificationScope.Node);
DirtyMasterNode(ModificationScope.Node);
}
}
}

10
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/PreviewManager.cs


Set(m_Identifiers, node.tempId, node.tempId);
Set(m_RenderDatas, node.tempId, renderData);
m_DirtyShaders.Add(node.tempId.index);
node.onModified += OnNodeModified;
node.RegisterCallback(OnNodeModified);
if (node.RequiresTime())
m_TimeDependentPreviews.Add(node.tempId.index);

{
PropagateNodeSet(m_DirtyShaders);
var masterNodes = new List<MasterNode>();
var masterNodes = new List<INode>();
var uberNodes = new List<INode>();
foreach (var index in m_DirtyShaders)
{

var masterNode = node as MasterNode;
var masterNode = node as IMasterNode;
masterNodes.Add(masterNode);
masterNodes.Add(node);
else
uberNodes.Add(node);
}

Object.DestroyImmediate(renderData.renderTexture, true);
if (renderData.shaderData != null && renderData.shaderData.node != null)
renderData.shaderData.node.onModified -= OnNodeModified;
renderData.shaderData.node.UnregisterCallback(OnNodeModified);
}
void DestroyPreview(Identifier nodeId)

4
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/GraphEditorView.cs


foreach (var node in m_Graph.removedNodes)
{
node.onModified -= OnNodeChanged;
node.UnregisterCallback(OnNodeChanged);
var nodeView = m_GraphView.nodes.ToList().OfType<MaterialNodeView>().FirstOrDefault(p => p.node != null && p.node.guid == node.guid);
if (nodeView != null)
{

var nodeView = new MaterialNodeView { userData = node };
m_GraphView.AddElement(nodeView);
nodeView.Initialize(node as AbstractMaterialNode, m_PreviewManager, m_EdgeConnectorListener);
node.onModified += OnNodeChanged;
node.RegisterCallback(OnNodeChanged);
nodeView.Dirty(ChangeType.Repaint);
if (m_SearchWindowProvider.nodeNeedsRepositioning && m_SearchWindowProvider.targetSlotReference.nodeGuid.Equals(node.guid))

4
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/MaterialNodeView.cs


void ConvertToShader(EventBase eventBase)
{
List<PropertyCollector.TextureInfo> textureInfo;
var masterNode = node as MasterNode;
var masterNode = node as IMasterNode;
var shader = masterNode.GetShader(GenerationMode.ForReals, masterNode.name, out textureInfo);
var shader = masterNode.GetShader(GenerationMode.ForReals, node.name, out textureInfo);
GUIUtility.systemCopyBuffer = shader;
}
else

7
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/Styles/MaterialGraph.uss


ScreenPositionSlotControlView > EnumField {
margin-top: 0;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
width: 54;
}

10
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/MasterNodes/AlphaMode.cs


using System;
namespace UnityEditor.ShaderGraph {
public enum AlphaMode
{
Opaque,
AlphaBlend,
AdditiveBlend
}
}

11
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/MasterNodes/AlphaMode.cs.meta


fileFormatVersion: 2
guid: 05d113c37ee6ad24cbd4b11bbaab371f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

7
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/MasterNodes/IPBRSubShader.cs


using System;
namespace UnityEditor.ShaderGraph {
public interface IPBRSubShader : ISubShader
{
}
}

11
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/MasterNodes/IPBRSubShader.cs.meta


fileFormatVersion: 2
guid: 8ba3702335c91a140bc0ee4c0891b160
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

8
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/MasterNodes/ISubShader.cs


using System;
namespace UnityEditor.ShaderGraph {
public interface ISubShader
{
string GetSubshader(IMasterNode masterNode, GenerationMode mode);
}
}

11
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/MasterNodes/ISubShader.cs.meta


fileFormatVersion: 2
guid: 9e131b3f1bf111d4caab49dcc291757b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

7
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/MasterNodes/IUnlitSubShader.cs


using System;
namespace UnityEditor.ShaderGraph
{
public interface IUnlitSubShader : ISubShader
{}
}

12
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/GuidEncoder.cs


using System;
namespace UnityEditor.ShaderGraph {
public static class GuidEncoder
{
public static string Encode(Guid guid)
{
string enc = Convert.ToBase64String(guid.ToByteArray());
return String.Format("{0:X}", enc.GetHashCode());
}
}
}

11
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Nodes/GuidEncoder.cs.meta


fileFormatVersion: 2
guid: 3cf71f51f0308524080bb4aba2c9bb81
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

28
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Util/ScreenSpaceType.cs


namespace UnityEditor.ShaderGraph
{
public enum ScreenSpaceType
{
Default,
Raw,
Center,
Tiled
};
public static class ScreenSpaceTypeExtensions
{
public static string ToValueAsVariable(this ScreenSpaceType screenSpaceType)
{
switch (screenSpaceType)
{
case ScreenSpaceType.Raw:
return string.Format("IN.{0}", ShaderGeneratorNames.ScreenPosition);
case ScreenSpaceType.Center:
return string.Format("float4(IN.{0}.xy / IN.{0}.w * 2 - 1, 0, 0)", ShaderGeneratorNames.ScreenPosition);
case ScreenSpaceType.Tiled:
return string.Format("frac(float4((IN.{0}.x / IN.{0}.w * 2 - 1) * _ScreenParams.x / _ScreenParams.y, IN.{0}.y / IN.{0}.w * 2 - 1, 0, 0))", ShaderGeneratorNames.ScreenPosition);
default:
return string.Format("float4(IN.{0}.xy / IN.{0}.w, 0, 0)", ShaderGeneratorNames.ScreenPosition);
}
}
}
}

11
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/Util/ScreenSpaceType.cs.meta


fileFormatVersion: 2
guid: d296e8d1103ed5c49a267d57be0f4d96
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

31
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/Slots/ScreenPositionSlotControlView.cs


using System;
using UnityEditor.Graphing;
using UnityEditor.Experimental.UIElements;
using UnityEngine.Experimental.UIElements;
namespace UnityEditor.ShaderGraph.Drawing.Slots
{
public class ScreenPositionSlotControlView : VisualElement
{
ScreenPositionMaterialSlot m_Slot;
public ScreenPositionSlotControlView(ScreenPositionMaterialSlot slot)
{
m_Slot = slot;
var enumField = new EnumField(slot.screenSpaceType);
enumField.OnValueChanged(OnValueChanged);
Add(enumField);
}
void OnValueChanged(ChangeEvent<Enum> evt)
{
var screenSpaceType = (ScreenSpaceType)evt.newValue;
if (screenSpaceType != m_Slot.screenSpaceType)
{
m_Slot.owner.owner.owner.RegisterCompleteObjectUndo("Change Screen Space Type");
m_Slot.screenSpaceType = screenSpaceType;
m_Slot.owner.Dirty(ModificationScope.Graph);
}
}
}
}

11
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Views/Slots/ScreenPositionSlotControlView.cs.meta


fileFormatVersion: 2
guid: 1774f54355319894888ab5ec90b728e7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

49
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Templates/lightweightUnlitExtraPasses.template


Pass
{
Tags{"LightMode" = "ShadowCaster"}
ZWrite On ZTest LEqual
HLSLPROGRAM
// Required to compile gles 2.0 with standard srp library
#pragma prefer_hlslcc gles
#pragma target 2.0
//--------------------------------------
// GPU Instancing
#pragma multi_compile_instancing
#pragma vertex ShadowPassVertex
#pragma fragment ShadowPassFragment
#include "LWRP/ShaderLibrary/LightweightPassShadow.hlsl"
ENDHLSL
}
Pass
{
Tags{"LightMode" = "DepthOnly"}
ZWrite On
ColorMask 0
HLSLPROGRAM
// Required to compile gles 2.0 with standard srp library
#pragma prefer_hlslcc gles
#pragma target 2.0
#pragma vertex vert
#pragma fragment frag
#include "LWRP/ShaderLibrary/Core.hlsl"
float4 vert(float4 pos : POSITION) : SV_POSITION
{
return TransformObjectToHClip(pos.xyz);
}
half4 frag() : SV_TARGET
{
return 0;
}
ENDHLSL
}

7
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Templates/lightweightUnlitExtraPasses.template.meta


fileFormatVersion: 2
guid: 0474c29971caa2a40ae1719012fbe90a
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

25
build.py


#!/usr/bin/python -B
import os
import logging
def packages_list():
return [
("com.unity.shadergraph", os.path.join("MaterialGraphProject", "Assets", "UnityShaderEditor"))
]
# Prepare an empty project for editor tests
def prepare_editor_test_project(repo_path, project_path, logger):
import unity_package_build
unity_package_build.copy_path_to_project(os.path.join("MaterialGraphProject", "Assets", "NewNodes"), repo_path, project_path, logger)
unity_package_build.copy_path_to_project(os.path.join("MaterialGraphProject", "Assets", "TestAssets"), repo_path, project_path, logger)
unity_package_build.copy_path_to_project(os.path.join("MaterialGraphProject", "Assets", "UnityShaderEditor", "Editor", "Testing"), repo_path, project_path, logger)
if __name__ == "__main__":
import sys
sys.path.insert(0, os.path.abspath(os.path.join("..", "automation-tools")))
try:
import unity_package_build
build_log = unity_package_build.setup()
except ImportError:
print "No Automation Tools found."

8
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/HDPipeline/IUnlitSubShader.cs


using System;
namespace UnityEditor.ShaderGraph {
public interface IUnlitSubShader
{
string GetSubshader(UnlitMasterNode masterNode, GenerationMode mode);
}
}

9
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/LightweightPipeline/ShaderTest.unity.meta


fileFormatVersion: 2
guid: 7878b24712c094649abcc7b75433986c
timeCreated: 1505339540
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

10
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/LightweightPipeline/Materials.meta


fileFormatVersion: 2
guid: 19fc28fd8cfc0e24185139d888b580e0
folderAsset: yes
timeCreated: 1505498024
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

996
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/LightweightPipeline/ShaderTest.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: 0
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.18381745, g: 0.22911131, b: 0.3040083, a: 1}
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 11
m_GIWorkflowMode: 0
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_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVRFilteringMode: 1
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 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 &38610488
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 38610489}
- component: {fileID: 38610492}
- component: {fileID: 38610491}
- component: {fileID: 38610490}
m_Layer: 0
m_Name: PBRSpecular
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &38610489
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 38610488}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -1.5}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1220808772}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!23 &38610490
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 38610488}
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: 0b6bd1d9f8dca444aa8695ad2c1b7152, 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_StitchLightmapSeams: 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!135 &38610491
SphereCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 38610488}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.5
m_Center: {x: 0, y: 0, z: 0}
--- !u!33 &38610492
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 38610488}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &250933708
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 250933712}
- component: {fileID: 250933711}
- component: {fileID: 250933710}
- component: {fileID: 250933709}
m_Layer: 0
m_Name: PBRMetallic
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!23 &250933709
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 250933708}
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: d6c557b0ad00a7946b27400b33a390ac, 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_StitchLightmapSeams: 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!135 &250933710
SphereCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 250933708}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.5
m_Center: {x: 0, y: 0, z: 0}
--- !u!33 &250933711
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 250933708}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &250933712
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 250933708}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -1.5, y: 0, z: -1.5}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1220808772}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &301674285
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 301674289}
- component: {fileID: 301674288}
- component: {fileID: 301674287}
- component: {fileID: 301674286}
m_Layer: 0
m_Name: BlinnPhong
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!23 &301674286
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 301674285}
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: 093053a5cbe55cc48a60db27e2b28232, 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_StitchLightmapSeams: 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!135 &301674287
SphereCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 301674285}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.5
m_Center: {x: 0, y: 0, z: 0}
--- !u!33 &301674288
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 301674285}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &301674289
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 301674285}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -3, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1045077821}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1045077820
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1045077821}
m_Layer: 0
m_Name: Handwritten
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1045077821
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1045077820}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1225949933}
- {fileID: 1117495945}
- {fileID: 301674289}
- {fileID: 1225352830}
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1117495944
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1117495945}
- component: {fileID: 1117495948}
- component: {fileID: 1117495947}
- component: {fileID: 1117495946}
m_Layer: 0
m_Name: PBRSpecular
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1117495945
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1117495944}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1045077821}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!23 &1117495946
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1117495944}
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: 74be5c6f41091b447bed7d64251620ee, 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_StitchLightmapSeams: 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!135 &1117495947
SphereCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1117495944}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.5
m_Center: {x: 0, y: 0, z: 0}
--- !u!33 &1117495948
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1117495944}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &1220808771
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1220808772}
m_Layer: 0
m_Name: Graph
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1220808772
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1220808771}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 250933712}
- {fileID: 38610489}
- {fileID: 1898501007}
- {fileID: 1407590066}
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1225352826
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1225352830}
- component: {fileID: 1225352829}
- component: {fileID: 1225352828}
- component: {fileID: 1225352827}
m_Layer: 0
m_Name: Unlit
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!23 &1225352827
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1225352826}
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: a94000a19a84e5c4f8816b53c83caa75, 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_StitchLightmapSeams: 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!135 &1225352828
SphereCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1225352826}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.5
m_Center: {x: 0, y: 0, z: 0}
--- !u!33 &1225352829
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1225352826}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &1225352830
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1225352826}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -4.5, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1045077821}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1225949929
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1225949933}
- component: {fileID: 1225949932}
- component: {fileID: 1225949931}
- component: {fileID: 1225949930}
m_Layer: 0
m_Name: PBRMetallic
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!23 &1225949930
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1225949929}
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: 9d1779795c4cf814e8732dc4542ac9ae, 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_StitchLightmapSeams: 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!135 &1225949931
SphereCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1225949929}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.5
m_Center: {x: 0, y: 0, z: 0}
--- !u!33 &1225949932
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1225949929}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &1225949933
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1225949929}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -1.5, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1045077821}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1407590065
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1407590066}
- component: {fileID: 1407590069}
- component: {fileID: 1407590068}
- component: {fileID: 1407590067}
m_Layer: 0
m_Name: Unlit
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1407590066
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1407590065}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -4.5, y: 0, z: -1.5}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1220808772}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!23 &1407590067
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1407590065}
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: ea0bef6a3bdc6474185c50a3a8939982, 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_StitchLightmapSeams: 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!135 &1407590068
SphereCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1407590065}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.5
m_Center: {x: 0, y: 0, z: 0}
--- !u!33 &1407590069
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1407590065}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &1641918147
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1641918149}
- component: {fileID: 1641918148}
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 &1641918148
Light:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1641918147}
m_Enabled: 1
serializedVersion: 8
m_Type: 1
m_Color: {r: 1, g: 1, b: 1, 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_ColorTemperature: 6570
m_UseColorTemperature: 0
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!4 &1641918149
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1641918147}
m_LocalRotation: {x: -0.008174582, y: 0.5575212, z: -0.47586018, w: 0.6801914}
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: 31.298002, y: 63.729004, z: -50.198}
--- !u!1 &1898501006
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1898501007}
- component: {fileID: 1898501010}
- component: {fileID: 1898501009}
- component: {fileID: 1898501008}
m_Layer: 0
m_Name: BlinnPhong
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1898501007
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1898501006}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -3, y: 0, z: -1.5}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1220808772}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!23 &1898501008
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1898501006}
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: 637f2a949394cb043bbb7a28df1ed9c9, 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_StitchLightmapSeams: 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!135 &1898501009
SphereCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1898501006}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Radius: 0.5
m_Center: {x: 0, y: 0, z: 0}
--- !u!33 &1898501010
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1898501006}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &1913430569
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1913430573}
- component: {fileID: 1913430572}
- component: {fileID: 1913430571}
- component: {fileID: 1913430570}
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 &1913430570
AudioListener:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1913430569}
m_Enabled: 1
--- !u!124 &1913430571
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1913430569}
m_Enabled: 1
--- !u!20 &1913430572
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1913430569}
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: 3
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 0
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &1913430573
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1913430569}
m_LocalRotation: {x: -0.28235355, y: 0.21969044, z: -0.06659774, w: -0.9314383}
m_LocalPosition: {x: -0.42957377, y: 1.5467438, z: -3.389049}
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}

/MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/HDPipeline/IUnlitSubShader.cs.meta → /MaterialGraphProject/Assets/UnityShaderEditor/Editor/Data/MasterNodes/IUnlitSubShader.cs.meta

正在加载...
取消
保存