Firstborn/Library/PackageCache/com.unity.render-pipelines..../Editor/ShaderGraph/AssetCallbacks/CreateLitShaderGraph.cs
Schaken-Mods 9092858a58 updated to the latest editor
I updated everything to the latest Unity Editor. Also realized I had the wrong shaders on my hairs, those are fixed and the hairs look MUCH better!
2023-05-07 17:43:11 -05:00

32 lines
1.2 KiB
C#

using System;
using UnityEditor.ShaderGraph;
using UnityEngine.Rendering;
namespace UnityEditor.Rendering.Universal.ShaderGraph
{
static class CreateLitShaderGraph
{
[MenuItem("Assets/Create/Shader Graph/URP/Lit Shader Graph", priority = CoreUtils.Priorities.assetsCreateShaderMenuPriority)]
public static void CreateLitGraph()
{
var target = (UniversalTarget)Activator.CreateInstance(typeof(UniversalTarget));
target.TrySetActiveSubTarget(typeof(UniversalLitSubTarget));
var blockDescriptors = new[]
{
BlockFields.VertexDescription.Position,
BlockFields.VertexDescription.Normal,
BlockFields.VertexDescription.Tangent,
BlockFields.SurfaceDescription.BaseColor,
BlockFields.SurfaceDescription.NormalTS,
BlockFields.SurfaceDescription.Metallic,
BlockFields.SurfaceDescription.Smoothness,
BlockFields.SurfaceDescription.Emission,
BlockFields.SurfaceDescription.Occlusion,
};
GraphUtil.CreateNewGraphWithOutputs(new[] { target }, blockDescriptors);
}
}
}