Struct FrameGraphResourceDescriptor
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
WidthintHeightintFormatFrameGraphResourceFormatFlagsFrameGraphResourceFlagsWidthScalefloatHeightScalefloat
Properties
Flags
public FrameGraphResourceFlags Flags { get; init; }
Property Value
Format
public FrameGraphResourceFormat Format { get; init; }
Property Value
Height
public int Height { get; init; }
Property Value
HeightScale
public float HeightScale { get; init; }
Property Value
Width
public int Width { get; init; }
Property Value
WidthScale
public float WidthScale { get; init; }
Property Value
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
widthintheightintformatFrameGraphResourceFormat
Returns
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
widthintheightintformatFrameGraphResourceFormat
Returns
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
widthScalefloatheightScalefloatformatFrameGraphResourceFormat