Table of Contents

Struct FrameGraphResourceDescriptor

Namespace
BSGameLib.Game.Rendering
Assembly
BSGameLib.Game.dll

Describes how a transient frame-graph resource should be created.

public readonly record struct FrameGraphResourceDescriptor : IEquatable<FrameGraphResourceDescriptor>
Implements
Inherited Members

Constructors

FrameGraphResourceDescriptor(int, int, FrameGraphResourceFormat, FrameGraphResourceFlags, float, float)

Describes how a transient frame-graph resource should be created.

public FrameGraphResourceDescriptor(int Width, int Height, FrameGraphResourceFormat Format = FrameGraphResourceFormat.Color8, FrameGraphResourceFlags Flags = FrameGraphResourceFlags.ColorAttachment | FrameGraphResourceFlags.ShaderResource, float WidthScale = 1, float HeightScale = 1)

Parameters

Width int
Height int
Format FrameGraphResourceFormat
Flags FrameGraphResourceFlags
WidthScale float
HeightScale float

Properties

Flags

public FrameGraphResourceFlags Flags { get; init; }

Property Value

FrameGraphResourceFlags

Format

public FrameGraphResourceFormat Format { get; init; }

Property Value

FrameGraphResourceFormat

Height

public int Height { get; init; }

Property Value

int

HeightScale

public float HeightScale { get; init; }

Property Value

float

Width

public int Width { get; init; }

Property Value

int

WidthScale

public float WidthScale { get; init; }

Property Value

float

Methods

ForColorTarget(int, int, FrameGraphResourceFormat)

Describes a colour target of a fixed size, which can be drawn into and read by a shader.

public static FrameGraphResourceDescriptor ForColorTarget(int width, int height, FrameGraphResourceFormat format = FrameGraphResourceFormat.Color8)

Parameters

width int
height int
format FrameGraphResourceFormat

Returns

FrameGraphResourceDescriptor

ForDepthTarget(int, int, FrameGraphResourceFormat)

Describes a depth target of a fixed size.

public static FrameGraphResourceDescriptor ForDepthTarget(int width, int height, FrameGraphResourceFormat format = FrameGraphResourceFormat.Depth24)

Parameters

width int
height int
format FrameGraphResourceFormat

Returns

FrameGraphResourceDescriptor

ForScaledColorTarget(float, float, FrameGraphResourceFormat)

Describes a colour target whose size is the back buffer's size times the given scales, worked out when the target is made.

public static FrameGraphResourceDescriptor ForScaledColorTarget(float widthScale, float heightScale, FrameGraphResourceFormat format = FrameGraphResourceFormat.Color8)

Parameters

widthScale float
heightScale float
format FrameGraphResourceFormat

Returns

FrameGraphResourceDescriptor