An editor-only Shader Graph node definition that exposes a View-to-Projection matrix. It declares a non-previewable node with a single output of type float4x4 named g_matViewToProjection and some editor UI attributes like title, category and icon.
namespace ShaderGraphPlus.Nodes;
/// <summary>
/// View-space coordinates converted to projection-space.
/// </summary>
[Title( "View To Projection" ), Category( "Variables/Matrix" ), Icon( "apps" )]
public sealed class ViewToProjectionNode : ShaderNodePlus
{
[JsonIgnore, Hide, Browsable( false )]
public override Color NodeTitleColor => ShaderGraphPlusTheme.NodeHeaderColors.GlobalVariableNode;
[JsonIgnore, Hide, Browsable( false )]
public override bool CanPreview => false;
[Output( typeof( Float4x4 ) ), Title( "Matrix" )]
[Hide]
public static NodeResult.Func Result => ( GraphCompiler compiler ) => new NodeResult( ResultType.Float4x4, "g_matViewToProjection" );
}