Diligent Engine
 
Loading...
Searching...
No Matches
Diligent::ExecuteSuperResolutionAttribs Struct Reference

Super resolution execute attributes. More...

#include <SuperResolution.h>

Public Attributes

IDeviceContextpContext = nullptr
 Device context to execute the super resolution on.
 
ITextureViewpColorTextureSRV = nullptr
 
ITextureViewpDepthTextureSRV = nullptr
 
ITextureViewpMotionVectorsSRV = nullptr
 
ITextureViewpOutputTextureView = nullptr
 
ITextureViewpExposureTextureSRV = nullptr
 
ITextureViewpReactiveMaskTextureSRV = nullptr
 
ITextureViewpIgnoreHistoryMaskTextureSRV = nullptr
 
RESOURCE_STATE_TRANSITION_MODE StateTransitionMode = RESOURCE_STATE_TRANSITION_MODE_TRANSITION
 
float JitterX = 0.0f
 
float JitterY = 0.0f
 
float PreExposure = 1.0f
 
float MotionVectorScaleX = 1.0f
 
float MotionVectorScaleY = 1.0f
 
float ExposureScale = 1.0f
 
float Sharpness = 0.0f
 
float CameraNear = 0.0f
 
float CameraFar = 0.0f
 
float CameraFovAngleVert = 0.0f
 
float TimeDeltaInSeconds = 0.0f
 
Bool ResetHistory = False
 

Detailed Description

Super resolution execute attributes.

This structure is used by ISuperResolution::Execute().

Member Data Documentation

◆ CameraFar

float Diligent::ExecuteSuperResolutionAttribs::CameraFar = 0.0f

Camera far plane distance.

Used by some upscalers for depth reconstruction. Default is 0.0 (not provided).

◆ CameraFovAngleVert

float Diligent::ExecuteSuperResolutionAttribs::CameraFovAngleVert = 0.0f

Camera vertical field of view angle, in radians.

Used by some upscalers for depth reconstruction. Default is 0.0 (not provided).

◆ CameraNear

float Diligent::ExecuteSuperResolutionAttribs::CameraNear = 0.0f

Camera near plane distance.

Used by some upscalers for depth reconstruction. Default is 0.0 (not provided).

◆ ExposureScale

float Diligent::ExecuteSuperResolutionAttribs::ExposureScale = 1.0f

Exposure scale value (scalar).

A multiplier applied to the exposure. This is separate from PreExposure and the exposure texture. Used by DirectSR-style upscalers. Default is 1.0 (no additional scaling).

◆ JitterX

float Diligent::ExecuteSuperResolutionAttribs::JitterX = 0.0f

Jitter offset X applied to the projection matrix (in pixels).

Used for temporal upscaling.

◆ JitterY

float Diligent::ExecuteSuperResolutionAttribs::JitterY = 0.0f

Jitter offset Y applied to the projection matrix (in pixels).

Used for temporal upscaling.

◆ MotionVectorScaleX

float Diligent::ExecuteSuperResolutionAttribs::MotionVectorScaleX = 1.0f

Motion vector scale X.

Multiplier applied to the X component of motion vectors. Use this to convert motion vectors from their native space to pixel space. Default is 1.0 (motion vectors are already in pixel space).

◆ MotionVectorScaleY

float Diligent::ExecuteSuperResolutionAttribs::MotionVectorScaleY = 1.0f

Motion vector scale Y.

Multiplier applied to the Y component of motion vectors. Use this to convert motion vectors from their native space to pixel space. Default is 1.0 (motion vectors are already in pixel space).

◆ pColorTextureSRV

ITextureView* Diligent::ExecuteSuperResolutionAttribs::pColorTextureSRV = nullptr

Low-resolution color texture (shader resource view).

This is the input image to be upscaled.

◆ pDepthTextureSRV

ITextureView* Diligent::ExecuteSuperResolutionAttribs::pDepthTextureSRV = nullptr

Depth buffer of the low-resolution render (shader resource view).

Required for temporal upscaling (SUPER_RESOLUTION_TYPE_TEMPORAL).

◆ pExposureTextureSRV

ITextureView* Diligent::ExecuteSuperResolutionAttribs::pExposureTextureSRV = nullptr

Exposure texture (shader resource view).

Optional. A 1x1 R16_FLOAT texture containing the exposure value. The upscaler reads the R channel and uses it to multiply the input color. Ignored when SuperResolutionDesc::Flags includes SUPER_RESOLUTION_FLAG_AUTO_EXPOSURE.

◆ pIgnoreHistoryMaskTextureSRV

ITextureView* Diligent::ExecuteSuperResolutionAttribs::pIgnoreHistoryMaskTextureSRV = nullptr

Ignore history mask texture (shader resource view).

Optional. Binary per-pixel mask where non-zero values indicate regions where temporal history should be completely discarded. Unlike the reactive mask which provides proportional control, this is a binary decision (discard or keep). Format must be TEX_FORMAT_R8_UINT.

◆ pMotionVectorsSRV

ITextureView* Diligent::ExecuteSuperResolutionAttribs::pMotionVectorsSRV = nullptr

Motion vectors texture (shader resource view).

Required for temporal upscaling (SUPER_RESOLUTION_TYPE_TEMPORAL). Expected to contain per-pixel 2D motion vectors in pixel space.

◆ pOutputTextureView

ITextureView* Diligent::ExecuteSuperResolutionAttribs::pOutputTextureView = nullptr

Output (upscaled) texture (unordered access view or render target view).

Must match SuperResolutionDesc::OutputWidth x SuperResolutionDesc::OutputWidthOutputHeight.

◆ pReactiveMaskTextureSRV

ITextureView* Diligent::ExecuteSuperResolutionAttribs::pReactiveMaskTextureSRV = nullptr

Reactive mask texture (shader resource view).

Optional. Per-pixel mask in [0, 1] range guiding temporal history usage: 0.0 - normal temporal behavior 1.0 - ignore temporal history (use current frame only) Useful for alpha-blended objects or areas with inaccurate motion vectors. Only used when SuperResolutionDesc::ReactiveMaskFormat != TEX_FORMAT_UNKNOWN.

◆ PreExposure

float Diligent::ExecuteSuperResolutionAttribs::PreExposure = 1.0f

Pre-exposure value.

If the input color texture is pre-multiplied by a fixed value, set this to that value so the upscaler can divide by it. Default is 1.0 (no pre-exposure adjustment).

◆ ResetHistory

Bool Diligent::ExecuteSuperResolutionAttribs::ResetHistory = False

Set to true to reset temporal history (e.g., on camera cut).

Default is False.

◆ Sharpness

float Diligent::ExecuteSuperResolutionAttribs::Sharpness = 0.0f

Sharpness control.

Controls the amount of sharpening applied during upscaling. Range is typically [0.0, 1.0], where 0.0 means no sharpening and 1.0 means maximum sharpening. Only used when the upscaler supports sharpness (see SUPER_RESOLUTION_TEMPORAL_CAP_FLAG_SHARPNESS). Default is 0.0 (no sharpening).

◆ StateTransitionMode

RESOURCE_STATE_TRANSITION_MODE Diligent::ExecuteSuperResolutionAttribs::StateTransitionMode = RESOURCE_STATE_TRANSITION_MODE_TRANSITION

Resource state transition mode.

Specifies whether the upscaler should perform resource state transitions for the input and output textures.

◆ TimeDeltaInSeconds

float Diligent::ExecuteSuperResolutionAttribs::TimeDeltaInSeconds = 0.0f

Time elapsed since the previous frame, in seconds.

Used by some upscalers to adjust temporal accumulation behavior. Default is 0.0.