Unity-NorthStar / data /Packages /com.unity.render-pipelines.universal /Editor /Decal /CreateDecalShaderGraph.cs
| using System; | |
| using UnityEditor.ShaderGraph; | |
| using UnityEngine.Rendering; | |
| namespace UnityEditor.Rendering.Universal.ShaderGraph | |
| { | |
| internal static class CreateDecalShaderGraph | |
| { | |
| [] | |
| public static void CreateLitGraph() | |
| { | |
| var target = (UniversalTarget)Activator.CreateInstance(typeof(UniversalTarget)); | |
| target.TrySetActiveSubTarget(typeof(UniversalDecalSubTarget)); | |
| var blockDescriptors = new[] | |
| { | |
| BlockFields.SurfaceDescription.BaseColor, | |
| BlockFields.SurfaceDescription.Alpha, | |
| BlockFields.SurfaceDescription.NormalTS, | |
| UniversalBlockFields.SurfaceDescription.NormalAlpha, | |
| BlockFields.SurfaceDescription.Metallic, | |
| BlockFields.SurfaceDescription.Occlusion, | |
| BlockFields.SurfaceDescription.Smoothness, | |
| UniversalBlockFields.SurfaceDescription.MAOSAlpha, | |
| }; | |
| GraphUtil.CreateNewGraphWithOutputs(new[] { target }, blockDescriptors); | |
| } | |
| } | |
| } | |