mirror of
https://github.com/Facepunch/sbox-public.git
synced 2026-01-20 04:10:00 -05:00
This commit imports the C# engine code and game files, excluding C++ source code. [Source-Commit: ceb3d758046e50faa6258bc3b658a30c97743268]
28 lines
1.1 KiB
C#
28 lines
1.1 KiB
C#
namespace Editor.ShaderGraph.Nodes;
|
|
|
|
/// <summary>
|
|
/// Info about the current viewport.
|
|
/// </summary>
|
|
[Title( "Viewport" ), Category( "Variables" ), Icon( "tv" )]
|
|
public sealed class ViewportNode : ShaderNode
|
|
{
|
|
[Output( typeof( Vector2 ) ), Title( "Size" )]
|
|
[Hide]
|
|
public static NodeResult.Func ViewportSize => ( GraphCompiler compiler ) => new( 2, "g_vViewportSize" );
|
|
|
|
[Output( typeof( Vector2 ) ), Title( "Inverse Size" )]
|
|
[Hide]
|
|
public static NodeResult.Func ViewportInverseSize => ( GraphCompiler compiler ) => new( 2, "g_vInvViewportSize" );
|
|
|
|
[Output( typeof( Vector2 ) ), Title( "Offset" )]
|
|
[Hide]
|
|
public static NodeResult.Func ViewportOffset => ( GraphCompiler compiler ) => new( 2, "g_vViewportOffset" );
|
|
|
|
[Output( typeof( float ) ), Title( "Min Z" )]
|
|
[Hide]
|
|
public static NodeResult.Func ViewportMinZ => ( GraphCompiler compiler ) => new( 1, "g_flViewportMinZ" );
|
|
|
|
[Output( typeof( float ) ), Title( "Max Z" )]
|
|
[Hide]
|
|
public static NodeResult.Func ViewportMaxZ => ( GraphCompiler compiler ) => new( 1, "g_flViewportMaxZ" );
|
|
} |