浏览代码

Merge branch 'hackweek2017' into tidying

# Conflicts:
#	MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/AbstractGraphEditWindow.cs
#	MaterialGraphProject/Assets/_MingWai/GeneratedTextureDemo/0-UnityLogo-Texture.asset.meta
#	MaterialGraphProject/Assets/_MingWai/Gradient.asset.meta
/main
Tim Cooper 7 年前
当前提交
0e769105
共有 39 个文件被更改,包括 709 次插入179 次删除
  1. 19
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/AbstractGraphEditWindow.cs
  2. 11
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/Drawer/GraphEditorDrawer.cs
  3. 48
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/Drawer/NodeDrawer.cs
  4. 19
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/Drawer/TitleBarDrawer.cs
  5. 13
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/Manipulators/ClickGlobalSelector.cs
  6. 50
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/Manipulators/Clicker.cs
  7. 35
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/Manipulators/Commandable.cs
  8. 2
      MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Resources/Styles/GraphEditor.uss
  9. 65
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Drawer/MaterialNodeDrawer.cs
  10. 7
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Drawer/NodePreviewDrawer.cs
  11. 34
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/MaterialGraphView.cs
  12. 1
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Presenters/SurfaceMasterPresenter.cs
  13. 11
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Resources/Styles/MaterialGraph.uss
  14. 13
      MaterialGraphProject/ProjectSettings/EditorSettings.asset
  15. 2
      MaterialGraphProject/ProjectSettings/ProjectVersion.txt
  16. 347
      MaterialGraphProject/Assets/Test.unity
  17. 9
      MaterialGraphProject/Assets/Test.unity.meta
  18. 1
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Testing/IntegrationTests/Graphs/New Shader Graph 1.ShaderGraph
  19. 11
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Testing/IntegrationTests/Graphs/New Shader Graph 1.ShaderGraph.meta
  20. 1
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Testing/IntegrationTests/Graphs/Test Shader Graph.ShaderGraph
  21. 17
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Testing/IntegrationTests/Graphs/Test Shader Graph.ShaderGraph.meta
  22. 92
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Testing/IntegrationTests/Graphs/Test Shader Graph.mat
  23. 10
      MaterialGraphProject/Assets/UnityShaderEditor/Editor/Testing/IntegrationTests/Graphs/Test Shader Graph.mat.meta
  24. 2
      README.md
  25. 9
      MaterialGraphProject/Assets/Florent/UnityEngine.MaterialGraph.ExportTextureMasterNode8e1be5fc-7506-4529-879d-f1ce8c5aab04.mat.meta
  26. 9
      MaterialGraphProject/Assets/Rinaldo/ShaderGraph.meta
  27. 9
      MaterialGraphProject/Assets/Rinaldo/ShaderGraph/Textures.meta
  28. 9
      MaterialGraphProject/Assets/_MingWai/GeneratedTextureDemo/0-UnityLogo-Texture.asset.meta
  29. 10
      MaterialGraphProject/Assets/_MingWai/Gradient.ShaderGraph.meta
  30. 9
      MaterialGraphProject/Assets/_MingWai/Gradient.asset.meta
  31. 4
      MaterialGraphProject/Packages/Config/manifest.json
  32. 9
      MaterialGraphProject/Packages/Config/manifest.json.meta

19
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/AbstractGraphEditWindow.cs


void OnEnable()
{
var source = CreateDataSource();
source.Initialize(inMemoryAsset, this);
m_GraphEditorDrawer = new GraphEditorDrawer(CreateGraphView(), source);
m_GraphEditorDrawer = new GraphEditorDrawer(CreateGraphView());
var source = CreateDataSource();
source.Initialize(inMemoryAsset, this);
m_GraphEditorDrawer.presenter = source;
}
void OnDisable()

{
if (shouldRepaint)
Repaint();
}
private bool focused { get; set; }
private void Focus(TimerState timerState)
{
m_GraphEditorDrawer.graphView.FrameAll();
focused = true;
}
public void PingAsset()

allowAlwaysRepaint = !allowAlwaysRepaint;
}
public void ChangeSelction(Object newSelection, bool refocus = true)
public void ChangeSelction(Object newSelection)
{
if (!EditorUtility.IsPersistent (newSelection))
return;

m_GraphEditorDrawer.presenter = source;
//m_GraphView.StretchToParentSize();
Repaint ();
if (refocus)
if (refocus)
{
focused = false;
m_GraphEditorDrawer.graphView.Schedule (Focus).StartingIn (1).Until (() => focused);

11
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/Drawer/GraphEditorDrawer.cs


using RMGUI.GraphView;
using UnityEngine.Experimental.UIElements;
namespace UnityEditor.Graphing.Drawing
{

private TitleBarDrawer m_TitleBarDrawer;
// TODO: Create graphView from here rather than have it passed in through constructor
public GraphEditorDrawer(GraphView graphView, AbstractGraphPresenter presenter)
public GraphEditorDrawer(GraphView graphView)
AddStyleSheetPath("Styles/GraphEditor");
m_TitleBarDrawer = new TitleBarDrawer(presenter.titleBar);
m_TitleBarDrawer = new TitleBarDrawer();
this.presenter = presenter;
AddStyleSheetPath("Styles/GraphEditor");
}
public override void OnDataChanged()

48
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/Drawer/NodeDrawer.cs


using UnityEditor.Graphing.Util;
using UnityEngine;
using UnityEngine.Experimental.UIElements;
using UnityEngine.Experimental.UIElements.StyleEnums;
namespace UnityEditor.Graphing.Drawing
{

m_ControlsContainer = new VisualContainer
{
name = "controls",
pickingMode = PickingMode.Ignore,
//pickingMode = PickingMode.Ignore,
};
leftContainer.AddChild(m_ControlsContainer);

private void AddControls(GraphNodePresenter nodeData)
{
var controlPresenters = nodeData.elements.OfType<GraphControlPresenter>().ToList();
m_ControlsContainer.ClearChildren();
m_CurrentControlPresenter.Clear();
{
m_ControlsContainer.ClearChildren();
m_CurrentControlPresenter.Clear();
}
if (controlPresenters.ItemsReferenceEquals(m_CurrentControlPresenter))
foreach (var controlData in controlPresenters)
for (int i = 0; i < controlPresenters.Count; i++)
{
var controlData = controlPresenters[i];
var imContainer = m_ControlsContainer.GetChildAt(i) as IMGUIContainer;
imContainer.OnGuiHandler = controlData.OnGUIHandler;
imContainer.height = controlData.GetHeight();
}
m_ControlsContainer.AddChild(CreateControl(controlData));
m_CurrentControlPresenter.Add(controlData);
else
{
m_ControlsContainer.ClearChildren();
m_CurrentControlPresenter.Clear();
}
foreach (var controlData in controlPresenters)
{
var imContainer = new IMGUIContainer(controlData.OnGUIHandler)
{
name = "element",
pickingMode = PickingMode.Position,
height = controlData.GetHeight()
};
m_ControlsContainer.AddChild(imContainer);
m_CurrentControlPresenter.Add(controlData);
}
}
IMGUIContainer CreateControl(GraphControlPresenter controlPresenter)
{
return new IMGUIContainer(controlPresenter.OnGUIHandler)
{
name = "element",
executionContext = controlPresenter.GetInstanceID(),
};
}
public override void OnDataChanged()

if (nodeData == null)
{
ClearChildren();
m_ControlsContainer.ClearChildren();
m_CurrentControlPresenter.Clear();
return;
}

19
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/Drawer/TitleBarDrawer.cs


}
}
public TitleBarDrawer(TitleBarPresenter dataProvider)
public TitleBarDrawer()
{
name = "TitleBar";

};
AddChild(m_RightContainer);
foreach (var leftItemData in dataProvider.leftItems)
m_LeftContainer.AddChild(new TitleBarButtonDrawer(leftItemData));
foreach (var rightItemData in dataProvider.rightItems)
m_RightContainer.AddChild(new TitleBarButtonDrawer(rightItemData));
this.dataProvider = dataProvider;
AddStyleSheetPath("Styles/TitleBar");
}

void UpdateContainer(VisualContainer container, IEnumerable<TitleBarButtonPresenter> itemDatas)
{
// The number of items can't change for now.
foreach (var pair in itemDatas.Zip(container.OfType<TitleBarButtonDrawer>()))
{
var itemData = pair.Item1;
var item = pair.Item2;
item.dataProvider = itemData;
}
container.ClearChildren();
foreach (var itemPresenter in itemDatas)
container.AddChild(new TitleBarButtonDrawer(itemPresenter));
}
protected override object toWatch

13
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/Manipulators/ClickGlobalSelector.cs


{
public ClickGlobalSelector()
{
phaseInterest = PropagationPhase.Capture;
public override EventPropagation HandleEvent(Event evt, VisualElement finalTarget)
public void HandleEvent(MouseEventBase evt)
{
var graphView = target as SerializableGraphView;
if (graphView == null)

}
return EventPropagation.Continue;
protected override void RegisterCallbacksOnTarget()
{
target.RegisterCallback<MouseDownEvent>(HandleEvent, Capture.Capture);
}
protected override void UnregisterCallbacksFromTarget()
{
target.UnregisterCallback<MouseDownEvent>(HandleEvent, Capture.Capture);
}
}
}

50
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/Manipulators/Clicker.cs


using System;
using UnityEngine;
using UnityEngine.Experimental.UIElements;
using MouseManipulator = UnityEngine.Experimental.UIElements.MouseManipulator;

activators.Add(new ManipulatorActivationFilter {button = MouseButton.LeftMouse});
}
public override EventPropagation HandleEvent(Event evt, VisualElement finalTarget)
{
switch (evt.type)
{
case EventType.MouseDown:
if (CanStartManipulation(evt))
{
this.TakeCapture();
initialTarget = finalTarget;
UpdateState(evt);
}
break;
case EventType.mouseDrag:
UpdateState(evt);
break;
case EventType.MouseUp:
if (CanStopManipulation(evt))
{
this.ReleaseCapture();
// withinInitialTarget = initialTarget != null && initialTarget.ContainsPoint(evt.mousePosition);
if (initialTarget != null && state == ClickerState.Active && onClick != null)
onClick();
initialTarget = null;
UpdateState(evt);
}
break;
}
return this.HasCapture() ? EventPropagation.Stop : EventPropagation.Continue;
}
void UpdateState(Event evt)
void UpdateState(MouseEventBase evt)
{
ClickerState newState;
if (initialTarget != null && initialTarget.ContainsPoint(evt.mousePosition))

if (onStateChange != null && state != newState)
onStateChange(newState);
state = newState;
}
protected override void RegisterCallbacksOnTarget()
{
target.RegisterCallback<MouseUpEvent>(OnMouseUp, Capture.Capture);
}
protected override void UnregisterCallbacksFromTarget()
{
target.UnregisterCallback<MouseUpEvent>(OnMouseUp, Capture.Capture);
}
void OnMouseUp(MouseUpEvent evt)
{
onClick();
}
}
}

35
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Drawing/Manipulators/Commandable.cs


m_Dictionary = new Dictionary<string, CommandHandler>();
}
public override EventPropagation HandleEvent(Event evt, VisualElement finalTarget)
public void HandleEvent(EventBase evt)
var isValidation = evt.type == EventType.ValidateCommand;
var isExecution = evt.type == EventType.ExecuteCommand;
var isValidation = evt.imguiEvent.type == EventType.ValidateCommand;
var isExecution = evt.imguiEvent.type == EventType.ExecuteCommand;
Debug.Log(evt.commandName);
Debug.Log(evt.imguiEvent.commandName);
if ((!isValidation && !isExecution) || !m_Dictionary.TryGetValue(evt.commandName, out handler))
return EventPropagation.Continue;
if ((!isValidation && !isExecution) || !m_Dictionary.TryGetValue(evt.imguiEvent.commandName, out handler))
{
return;
}
return EventPropagation.Stop;
{
evt.StopPropagation();
return;
}
return EventPropagation.Continue;
{
return;
}
return EventPropagation.Stop;
evt.StopPropagation();
}
public void Add(string commandName, CommandValidator validator, CommandExecutor executor)

public IEnumerator<KeyValuePair<string, CommandHandler>> GetEnumerator()
{
return m_Dictionary.GetEnumerator();
}
protected override void RegisterCallbacksOnTarget()
{
target.RegisterCallback<IMGUIEvent>(HandleEvent);
}
protected override void UnregisterCallbacksFromTarget()
{
target.UnregisterCallback<IMGUIEvent>(HandleEvent);
}
}

2
MaterialGraphProject/Assets/GraphFramework/SerializableGraph/Editor/Resources/Styles/GraphEditor.uss


GraphEditorDrawer #GraphView {
flex: 1;
}
}

65
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Drawer/MaterialNodeDrawer.cs


{
public class MaterialNodeDrawer : NodeDrawer
{
VisualContainer m_PreviewContainer;
private List<NodePreviewPresenter> m_currentPreviewData;
Image m_PreviewImage;
NodePreviewPresenter m_currentPreviewData;
bool m_IsScheduled;
public MaterialNodeDrawer()

private void CreateContainers()
{
m_PreviewContainer = new VisualContainer
m_PreviewImage = new Image
image = Texture2D.whiteTexture
leftContainer.AddChild(m_PreviewContainer);
m_currentPreviewData = new List<NodePreviewPresenter>();
m_PreviewImage.AddToClassList("inactive");
leftContainer.AddChild(m_PreviewImage);
Debug.LogFormat("SchedulePolling");
if (panel != null)
{
if (!m_IsScheduled)

private void UnschedulePolling()
{
Debug.LogFormat("UnschedulePolling");
if (m_IsScheduled && panel != null)
{
this.Unschedule(InvalidateUIIfNeedsTime);

if (childrenNodes.OfType<IRequiresTime>().Any())
{
data.OnModified(ModificationScope.Node);
UpdatePreviewTexture(m_currentPreviewData);
Dirty(ChangeType.Repaint);
private void AddPreview(MaterialNodePresenter nodeData)
void UpdatePreviewTexture(NodePreviewPresenter previewPresenter)
if (!nodeData.elements.OfType<NodePreviewPresenter>().Any())
return;
var previews = nodeData.elements.OfType<NodePreviewPresenter>().ToList();
if (!previews.ItemsReferenceEquals(m_currentPreviewData))
var texture = previewPresenter != null ? previewPresenter.Render(new Vector2(256, 256)) : null;
if (texture == null)
m_PreviewContainer.ClearChildren();
m_currentPreviewData = previews;
foreach (var preview in previews)
{
var thePreview = new NodePreviewDrawer
{
data = preview,
name = "image"
};
m_PreviewContainer.AddChild(thePreview);
}
m_PreviewImage.AddToClassList("inactive");
m_PreviewImage.image = Texture2D.whiteTexture;
}
else
{
m_PreviewImage.RemoveFromClassList("inactive");
m_PreviewImage.image = texture;
}
}

var nodeData = GetPresenter<MaterialNodePresenter>();
if (nodeData == null)
{
m_PreviewContainer.ClearChildren();
m_currentPreviewData.Clear();
m_PreviewImage.AddToClassList("inactive");
m_currentPreviewData = null;
UpdatePreviewTexture(m_currentPreviewData);
AddPreview(nodeData);
m_currentPreviewData = nodeData.elements.OfType<NodePreviewPresenter>().FirstOrDefault();
UpdatePreviewTexture(m_currentPreviewData);
{
//m_PreviewContainer.paintFlags &= ~PaintFlags.Invisible;
m_PreviewContainer.RemoveFromClassList("hidden");
}
m_PreviewImage.RemoveFromClassList("hidden");
{
//m_PreviewContainer.paintFlags |= PaintFlags.Invisible;
m_PreviewContainer.AddToClassList("hidden");
}
m_PreviewImage.AddToClassList("hidden");
}
}
}

7
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Drawer/NodePreviewDrawer.cs


{
public NodePreviewPresenter data;
public override void DoRepaint(IStylePainter painter)
public override void DoRepaint()
Debug.Log("DoRepaint");
painter.DrawTexture(position, image, new Color(1, 1, 1, 1), scaleMode);
//base.DoRepaint(args);
base.DoRepaint();
}
}
}

34
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/MaterialGraphView.cs


using UnityEngine.MaterialGraph;
using UnityEngine.Experimental.UIElements;
using Edge = RMGUI.GraphView.Edge;
using MouseButton = RMGUI.GraphView.MouseButton;
using Object = UnityEngine.Object;
namespace UnityEditor.MaterialGraph.Drawing

public MaterialGraphView()
{
AddManipulator(new ContextualMenu(DoContextMenu));
RegisterCallback<MouseUpEvent>(DoContextMenu);
typeFactory[typeof(MaterialNodePresenter)] = typeof(MaterialNodeDrawer);
typeFactory[typeof(GraphAnchorPresenter)] = typeof(NodeAnchor);

return true;
}
protected EventPropagation DoContextMenu(Event evt, Object customData)
protected void DoContextMenu(MouseUpEvent evt)
var gm = new GenericMenu();
foreach (Type type in Assembly.GetAssembly(typeof(AbstractMaterialNode)).GetTypes())
if (evt.button == (int)MouseButton.RightMouse)
if (type.IsClass && !type.IsAbstract && (type.IsSubclassOf(typeof(AbstractMaterialNode))))
var gm = new GenericMenu();
foreach (Type type in Assembly.GetAssembly(typeof(AbstractMaterialNode)).GetTypes())
var attrs = type.GetCustomAttributes(typeof(TitleAttribute), false) as TitleAttribute[];
if (attrs != null && attrs.Length > 0 && CanAddToNodeMenu(type))
if (type.IsClass && !type.IsAbstract && (type.IsSubclassOf(typeof(AbstractMaterialNode))))
gm.AddItem(new GUIContent(attrs[0].m_Title), false, AddNode, new AddNodeCreationObject(type, evt.mousePosition));
var attrs = type.GetCustomAttributes(typeof(TitleAttribute), false) as TitleAttribute[];
if (attrs != null && attrs.Length > 0 && CanAddToNodeMenu(type))
{
gm.AddItem(new GUIContent(attrs[0].m_Title), false, AddNode, new AddNodeCreationObject(type, evt.mousePosition));
}
//gm.AddSeparator("");
// gm.AddItem(new GUIContent("Convert To/SubGraph"), true, ConvertSelectionToSubGraph);
gm.ShowAsContext();
//gm.AddSeparator("");
// gm.AddItem(new GUIContent("Convert To/SubGraph"), true, ConvertSelectionToSubGraph);
gm.ShowAsContext();
return EventPropagation.Stop;
evt.StopPropagation();
private class AddNodeCreationObject : object
private class AddNodeCreationObject
{
public Vector2 m_Pos;
public readonly Type m_Type;

return;
var drawstate = node.drawState;
Vector3 localPos = contentViewContainer.transform.inverse.MultiplyPoint3x4(posObj.m_Pos);
Vector3 localPos = contentViewContainer.transform.matrix.inverse.MultiplyPoint3x4(posObj.m_Pos);
drawstate.position = new Rect(localPos.x, localPos.y, 0, 0);
node.drawState = drawstate;

1
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Drawing/Presenters/SurfaceMasterPresenter.cs


using System.Collections.Generic;
using RMGUI.GraphView;
using UnityEditor.Graphing.Drawing;
using UnityEngine;
using UnityEngine.MaterialGraph;
namespace UnityEditor.MaterialGraph.Drawing

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


.MaterialNode #preview {
flex-direction: column;
background-color: #444;
height: 200;
width: 200;
.MaterialNode #preview #image {
height: 200;
width: 200;
.MaterialNode #preview.inactive {
background-color: #FF0000;
}
GridBackground {

spacing:75.0;
thick-lines:10;
}
}

13
MaterialGraphProject/ProjectSettings/EditorSettings.asset


--- !u!159 &1
EditorSettings:
m_ObjectHideFlags: 0
serializedVersion: 3
serializedVersion: 5
m_WebSecurityEmulationEnabled: 0
m_WebSecurityEmulationHostUrl: http://www.mydomain.com/mygame.unity3d
m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd
m_EtcTextureCompressorBehavior: 0
m_EtcTextureFastCompressor: 0
m_EtcTextureNormalCompressor: 2
m_EtcTextureBestCompressor: 5
m_ProjectGenerationIncludedExtensions: txt;xml;fnt;cd;uss
m_UserGeneratedProjectSuffix:
m_CollabEditorSettings:
inProgressEnabled: 1

2
MaterialGraphProject/ProjectSettings/ProjectVersion.txt


m_EditorVersion: 2017.2.0a1
m_EditorVersion: 2017.3.0a1

347
MaterialGraphProject/Assets/Test.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.18028346, g: 0.22571373, b: 0.30692244, 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 &1679979307
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1679979309}
- component: {fileID: 1679979308}
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 &1679979308
Light:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1679979307}
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_ColorTemperature: 6570
m_UseColorTemperature: 0
m_ShadowRadius: 0
m_ShadowAngle: 0
--- !u!4 &1679979309
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1679979307}
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}
--- !u!1 &1881005728
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1881005732}
- component: {fileID: 1881005731}
- component: {fileID: 1881005730}
- component: {fileID: 1881005729}
m_Layer: 0
m_Name: Plane
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!23 &1881005729
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1881005728}
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: dbf7bd14b02fbbf40b4ea779cc10622e, 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_StitchSeams: 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!64 &1881005730
MeshCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1881005728}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Convex: 0
m_InflateMesh: 0
m_SkinWidth: 0.01
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
--- !u!33 &1881005731
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1881005728}
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &1881005732
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1881005728}
m_LocalRotation: {x: -0.7071068, y: -0, z: -0, w: 0.7071068}
m_LocalPosition: {x: -0.027431965, y: 1.01, z: -0.2}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: -90.00001, y: 0, z: 0}
--- !u!1 &2102954616
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 2102954620}
- component: {fileID: 2102954619}
- component: {fileID: 2102954618}
- component: {fileID: 2102954617}
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 &2102954617
AudioListener:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2102954616}
m_Enabled: 1
m_ExtensionPropertyValues: []
--- !u!124 &2102954618
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2102954616}
m_Enabled: 1
--- !u!20 &2102954619
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2102954616}
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 &2102954620
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2102954616}
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}

9
MaterialGraphProject/Assets/Test.unity.meta


fileFormatVersion: 2
guid: f93d0bc4dddc566439b347036784c47e
timeCreated: 1500036707
licenseType: Pro
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

1
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Testing/IntegrationTests/Graphs/New Shader Graph 1.ShaderGraph


{"m_SerializableNodes":[],"m_SerializableEdges":[],"m_ActiveMasterNodeGUIDSerialized":"a24f6342-6ad0-435a-8918-0cc483d83659"}

11
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Testing/IntegrationTests/Graphs/New Shader Graph 1.ShaderGraph.meta


fileFormatVersion: 2
guid: 87ebd1179c598234faa4c7d160de0e69
timeCreated: 1499938288
licenseType: Pro
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

1
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Testing/IntegrationTests/Graphs/Test Shader Graph.ShaderGraph
文件差异内容过多而无法显示
查看文件

17
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Testing/IntegrationTests/Graphs/Test Shader Graph.ShaderGraph.meta


fileFormatVersion: 2
guid: 2d2b482951ae9934eb58e29aad0367cc
timeCreated: 1500038004
licenseType: Pro
ShaderImporter:
externalObjects: {}
defaultTextures: []
nonModifiableTextures:
- Texture_Texture_50D7B187_Uniform: {fileID: 2800000, guid: 225a31f233f5b82488f996901413908d,
type: 3}
- Texture_Texture_179334A_Uniform: {fileID: 2800000, guid: 225a31f233f5b82488f996901413908d,
type: 3}
- Texture_Texture_F5D09BA1_Uniform: {fileID: 10300, guid: 0000000000000000f000000000000000,
type: 0}
userData:
assetBundleName:
assetBundleVariant:

92
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Testing/IntegrationTests/Graphs/Test Shader Graph.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: Test Shader Graph
m_Shader: {fileID: 4800000, guid: 2d2b482951ae9934eb58e29aad0367cc, type: 3}
m_ShaderKeywords:
m_LightmapFlags: 0
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- Texture_Texture_179334A_Uniform:
m_Texture: {fileID: 2800000, guid: 225a31f233f5b82488f996901413908d, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- Texture_Texture_50567049_Uniform:
m_Texture: {fileID: 2800000, guid: 5b16ea7ee68dfd54f9e88408906bd687, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- Texture_Texture_50D7B187_Uniform:
m_Texture: {fileID: 2800000, guid: 225a31f233f5b82488f996901413908d, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- Texture_Texture_F5D09BA1_Uniform:
m_Texture: {fileID: 10300, guid: 0000000000000000f000000000000000, type: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _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: 0}
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}

10
MaterialGraphProject/Assets/UnityShaderEditor/Editor/Testing/IntegrationTests/Graphs/Test Shader Graph.mat.meta


fileFormatVersion: 2
guid: dbf7bd14b02fbbf40b4ea779cc10622e
timeCreated: 1500024557
licenseType: Pro
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

2
README.md


# Shader graph
Unity branch: `editor/tech/events-draft/canvas2d/shadergraph`

9
MaterialGraphProject/Assets/Florent/UnityEngine.MaterialGraph.ExportTextureMasterNode8e1be5fc-7506-4529-879d-f1ce8c5aab04.mat.meta


fileFormatVersion: 2
guid: 34cd8c08793117743a70e155cc20695b
timeCreated: 1499857151
licenseType: Pro
NativeFormatImporter:
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

9
MaterialGraphProject/Assets/Rinaldo/ShaderGraph.meta


fileFormatVersion: 2
guid: 1678733d6c0ab1046b3f485042b3a7f7
folderAsset: yes
timeCreated: 1499856754
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

9
MaterialGraphProject/Assets/Rinaldo/ShaderGraph/Textures.meta


fileFormatVersion: 2
guid: 97a3ddbc1b824e344bcb6c99a946e205
folderAsset: yes
timeCreated: 1499856755
licenseType: Pro
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

9
MaterialGraphProject/Assets/_MingWai/GeneratedTextureDemo/0-UnityLogo-Texture.asset.meta


fileFormatVersion: 2
guid: f5a9b1ce6937e6348af4e169bd4b0f3d
timeCreated: 1495750594
licenseType: Pro
NativeFormatImporter:
mainObjectFileID: 8600000
userData:
assetBundleName:
assetBundleVariant:

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


fileFormatVersion: 2
guid: a6f09a05d7731ad4b898124d9a681887
timeCreated: 1499857140
licenseType: Pro
ShaderImporter:
defaultTextures: []
nonModifiableTextures: []
userData:
assetBundleName:
assetBundleVariant:

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


fileFormatVersion: 2
guid: b2d92851c9360294d858f87c2ff5e42d
timeCreated: 1495750594
licenseType: Pro
NativeFormatImporter:
mainObjectFileID: 8600000
userData:
assetBundleName:
assetBundleVariant:

4
MaterialGraphProject/Packages/Config/manifest.json


{
"dependencies": {
}
}

9
MaterialGraphProject/Packages/Config/manifest.json.meta


fileFormatVersion: 2
guid: 49bf290c29a827b4db5fa41af1124b2d
timeCreated: 1499865694
licenseType: Pro
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存