Editor/ShaderGraphPlus/Nodes/Variables/Camera.cs
namespace ShaderGraphPlus.Nodes;
/// <summary>
/// Camera position and shit
/// </summary>
[Title( "Camera" ), Category( "Variables" ), Icon( "photo_camera" )]
public sealed class Camera : ShaderNodePlus
{
[JsonIgnore, Hide, Browsable( false )]
public override Color NodeTitleColor => ShaderGraphPlusTheme.NodeHeaderColors.GlobalVariableNode;
[Output( typeof( Vector3 ) ), Title( "Position" )]
[Hide]
public static NodeResult.Func WorldPosition => ( GraphCompiler compiler ) => new( ResultType.Vector3, "g_vCameraPositionWs" );
[Output( typeof( Vector3 ) )]
[Hide]
public static NodeResult.Func Direction => ( GraphCompiler compiler ) => new( ResultType.Vector3, "g_vCameraDirWs" );
[Output( typeof( float ) )]
[Hide]
public static NodeResult.Func NearPlane => ( GraphCompiler compiler ) => new( ResultType.Float, "g_flNearPlane" );
[Output( typeof( float ) )]
[Hide]
public static NodeResult.Func FarPlane => ( GraphCompiler compiler ) => new( ResultType.Float, "g_flFarPlane" );
}