class VRSRenderModule
VRSRenderModule takes care of:
-
querying hardware VRS support
-
generating motion vectors of current frame
-
generating VRS image based on motion vectors and history color buffer
-
copying color buffer into history color buffer
-
displaying overlay of VRS image
-
setting VRS options
File location: samples/vrs/vrsrendermodule.h
Construction
Return type |
Description |
---|---|
Constructor.
|
Methods
Return type |
Description |
---|---|
void |
Init (const json& initData)
This function checks hardware VRS suppport, builds user interface, creates GPU resources, sets up callback functions and initializes ffx_vrs backend.
|
void |
OnResize (const cauldron::ResolutionInfo & resInfo)
Recreate the FFX API context to resize internal resources.
|
void |
Execute (double deltaTime, cauldron::CommandList * pCmdList)
Calls ExecuteVRSImageGen to dipatch computer shader to generate VRS image.
|
void |
OnNewContentLoaded (cauldron::ContentBlock * pContentBlock)
Creates pipeline object and sets up surface information for each mesh to be rendered in velocity pass.
|
void |
OnContentUnloaded (cauldron::ContentBlock * pContentBlock)
|
Detailed description
VRSRenderModule takes care of:
-
querying hardware VRS support
-
generating motion vectors of current frame
-
generating VRS image based on motion vectors and history color buffer
-
copying color buffer into history color buffer
-
displaying overlay of VRS image
-
setting VRS options
Construction
VRSRenderModule
Constructor.
Methods
Init
This function checks hardware VRS suppport, builds user interface, creates GPU resources, sets up callback functions and initializes ffx_vrs backend.
OnResize
virtual void OnResize (const cauldron::ResolutionInfo & resInfo)
Recreate the FFX API context to resize internal resources. Called by the framework when the resolution changes.
Parameters:
resInfo |
New resolution info. |
Execute
virtual void Execute (double deltaTime, cauldron::CommandList * pCmdList)
Calls ExecuteVRSImageGen to dipatch computer shader to generate VRS image.
OnNewContentLoaded
virtual void OnNewContentLoaded (cauldron::ContentBlock * pContentBlock)
Creates pipeline object and sets up surface information for each mesh to be rendered in velocity pass.