You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
823 B
24 lines
823 B
using System;
|
|
using UnityEditor.ShaderGraph;
|
|
using UnityEngine.Rendering;
|
|
|
|
namespace UnityEditor.Rendering.HighDefinition.ShaderGraph
|
|
{
|
|
internal static class CreateFogVolumeShaderGraph
|
|
{
|
|
[MenuItem("Assets/Create/Shader Graph/HDRP/Fog Volume Shader Graph", priority = CoreUtils.Priorities.assetsCreateShaderMenuPriority + 8)]
|
|
public static void Create()
|
|
{
|
|
var target = (HDTarget)Activator.CreateInstance(typeof(HDTarget));
|
|
target.TrySetActiveSubTarget(typeof(FogVolumeSubTarget));
|
|
|
|
var blockDescriptors = new[]
|
|
{
|
|
BlockFields.SurfaceDescription.BaseColor,
|
|
BlockFields.SurfaceDescription.Alpha,
|
|
};
|
|
|
|
GraphUtil.CreateNewGraphWithOutputs(new[] { target }, blockDescriptors);
|
|
}
|
|
}
|
|
}
|