initial commit
This commit is contained in:
parent
6715289efe
commit
788c3389af
37645 changed files with 2526849 additions and 80 deletions
|
@ -0,0 +1,14 @@
|
|||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
|
||||
namespace UnityEditor.ShaderGraph
|
||||
{
|
||||
static class CreateShaderGraph
|
||||
{
|
||||
[MenuItem("Assets/Create/Shader Graph/Blank Shader Graph", priority = CoreUtils.Sections.section1 + CoreUtils.Priorities.assetsCreateShaderMenuPriority)]
|
||||
public static void CreateBlankShaderGraph()
|
||||
{
|
||||
GraphUtil.CreateNewGraph();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 14e8f865381f1714ab38debdb40a5989
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,28 @@
|
|||
using System.IO;
|
||||
using UnityEditor.ProjectWindowCallback;
|
||||
using UnityEngine.Rendering;
|
||||
|
||||
namespace UnityEditor.ShaderGraph
|
||||
{
|
||||
class CreateShaderSubGraph : EndNameEditAction
|
||||
{
|
||||
[MenuItem("Assets/Create/Shader Graph/Sub Graph", priority = CoreUtils.Sections.section1 + CoreUtils.Priorities.assetsCreateShaderMenuPriority + 1)]
|
||||
public static void CreateMaterialSubGraph()
|
||||
{
|
||||
ProjectWindowUtil.StartNameEditingIfProjectWindowExists(0, CreateInstance<CreateShaderSubGraph>(),
|
||||
string.Format("New Shader Sub Graph.{0}", ShaderSubGraphImporter.Extension), null, null);
|
||||
}
|
||||
|
||||
public override void Action(int instanceId, string pathName, string resourceFile)
|
||||
{
|
||||
var graph = new GraphData { isSubGraph = true };
|
||||
var outputNode = new SubGraphOutputNode();
|
||||
graph.AddNode(outputNode);
|
||||
graph.outputNode = outputNode;
|
||||
outputNode.AddSlot(ConcreteSlotValueType.Vector4);
|
||||
graph.path = "Sub Graphs";
|
||||
FileUtilities.WriteShaderGraphToDisk(pathName, graph);
|
||||
AssetDatabase.Refresh();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: beb456cc86fd0ea4a9943f78665a8ec2
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
|
@ -0,0 +1,25 @@
|
|||
#if VFX_GRAPH_10_0_0_OR_NEWER
|
||||
using System;
|
||||
using UnityEditor.ShaderGraph;
|
||||
using UnityEngine.Rendering;
|
||||
|
||||
namespace UnityEditor.ShaderGraph
|
||||
{
|
||||
static class CreateVFXShaderGraph
|
||||
{
|
||||
[MenuItem("Assets/Create/Shader Graph/VFX Shader Graph", priority = CoreUtils.Sections.section2 + CoreUtils.Priorities.assetsCreateShaderMenuPriority)]
|
||||
public static void CreateVFXGraph()
|
||||
{
|
||||
var target = (VFXTarget)Activator.CreateInstance(typeof(VFXTarget));
|
||||
|
||||
var blockDescriptors = new[]
|
||||
{
|
||||
BlockFields.SurfaceDescription.BaseColor,
|
||||
BlockFields.SurfaceDescription.Alpha,
|
||||
};
|
||||
|
||||
GraphUtil.CreateNewGraphWithOutputs(new[] {target}, blockDescriptors);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4aed1be68a7498d468a7ea49a3280138
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Add table
Add a link
Reference in a new issue