VrsRenderModule
Navigation: Samples → Effect samples → FidelityFX VRS sample
VrsRenderModule
VrsRenderModule Reference Documentation.
Functions
VRSRenderModule
VRSRenderModule()
Constructor.
Source: samples/vrs/vrsrendermodule.h
(line 71, column 5)
~VRSRenderModule
virtual ~VRSRenderModule()
Destructor.
Attributes: virtual
Source: samples/vrs/vrsrendermodule.h
(line 75, column 13)
Init
virtual void Init(const json &initData) override
This function checks hardware VRS suppport, builds user interface, creates GPU resources, sets up callback functions and initializes ffx_vrs backend.
Parameters:
Name | Type | Default |
---|---|---|
initData | const json & | “ |
Attributes: virtual
Source: samples/vrs/vrsrendermodule.h
(line 81, column 10)
OnResize
virtual void OnResize(const cauldron::ResolutionInfo &resInfo) override
Recreate the FFX API context to resize internal resources. Called by the framework when the resolution changes.
Parameters:
resInfo
(const cauldron::ResolutionInfo &
) – New resolution info.
Attributes: virtual
Source: samples/vrs/vrsrendermodule.h
(line 86, column 10)
Execute
virtual void Execute(double deltaTime, cauldron::CommandList *pCmdList) override
Calls ExecuteVRSImageGen to dipatch computer shader to generate VRS image.
Parameters:
Name | Type | Default |
---|---|---|
deltaTime | double | “ |
pCmdList | cauldron::CommandList * | “ |
Attributes: virtual
Source: samples/vrs/vrsrendermodule.h
(line 90, column 18)
OnNewContentLoaded
virtual void OnNewContentLoaded(cauldron::ContentBlock *pContentBlock) override
Creates pipeline object and sets up surface information for each mesh to be rendered in velocity pass.
Parameters:
Name | Type | Default |
---|---|---|
pContentBlock | cauldron::ContentBlock * | “ |
Attributes: virtual
Source: samples/vrs/vrsrendermodule.h
(line 95, column 18)
OnContentUnloaded
virtual void OnContentUnloaded(cauldron::ContentBlock *pContentBlock) override
Parameters:
Name | Type | Default |
---|---|---|
pContentBlock | cauldron::ContentBlock * | “ |
Attributes: virtual
Source: samples/vrs/vrsrendermodule.h
(line 99, column 18)
BuildUI
void BuildUI()
Source: samples/vrs/vrsrendermodule.h
(line 103, column 10)
InitOverlay
void InitOverlay(const json &initData)
Parameters:
Name | Type | Default |
---|---|---|
initData | const json & | “ |
Source: samples/vrs/vrsrendermodule.h
(line 104, column 10)
InitMotionVectors
void InitMotionVectors(const json &initData)
Parameters:
Name | Type | Default |
---|---|---|
initData | const json & | “ |
Source: samples/vrs/vrsrendermodule.h
(line 105, column 10)
InitFfxBackend
void InitFfxBackend()
Source: samples/vrs/vrsrendermodule.h
(line 106, column 10)
InitFfxContext
void InitFfxContext()
Source: samples/vrs/vrsrendermodule.h
(line 107, column 10)
DestroyFfxContext
void DestroyFfxContext()
Source: samples/vrs/vrsrendermodule.h
(line 108, column 10)
CopyColorBufferCallback
void CopyColorBufferCallback(double deltaTime, cauldron::CommandList *pCmdList)
This callback function copies color buffer of current frame into HistoryColorBuffer to be used for next frame to generate VRS image.
Parameters:
Name | Type | Default |
---|---|---|
deltaTime | double | “ |
pCmdList | cauldron::CommandList * | “ |
Source: samples/vrs/vrsrendermodule.h
(line 114, column 10)
DrawOverlayCallback
void DrawOverlayCallback(double deltaTime, cauldron::CommandList *pCmdList)
This callback function draws VRS image over rendered scene.
Parameters:
Name | Type | Default |
---|---|---|
deltaTime | double | “ |
pCmdList | cauldron::CommandList * | “ |
Source: samples/vrs/vrsrendermodule.h
(line 118, column 10)
GenerateMotionVectorsCallback
void GenerateMotionVectorsCallback(double deltaTime, cauldron::CommandList *pCmdList)
This callback function generates motion vector for each pixel. The motion vector will be used to determine on-screen position of a pixel in the last frame.
Parameters:
Name | Type | Default |
---|---|---|
deltaTime | double | “ |
pCmdList | cauldron::CommandList * | “ |
Source: samples/vrs/vrsrendermodule.h
(line 123, column 10)
ToggleVariableShading
void ToggleVariableShading()
Source: samples/vrs/vrsrendermodule.h
(line 125, column 10)
ToggleShadingRateImage
void ToggleShadingRateImage()
Source: samples/vrs/vrsrendermodule.h
(line 126, column 10)
ToggleOverlay
void ToggleOverlay()
Source: samples/vrs/vrsrendermodule.h
(line 127, column 10)
SelectBaseShadingRate
void SelectBaseShadingRate()
Source: samples/vrs/vrsrendermodule.h
(line 128, column 10)
SelectCombiner
void SelectCombiner()
Source: samples/vrs/vrsrendermodule.h
(line 129, column 10)
UpdateVRSInfo
void UpdateVRSInfo()
Source: samples/vrs/vrsrendermodule.h
(line 131, column 10)
UpdateVRSContext
void UpdateVRSContext(bool enabled)
Parameters:
Name | Type | Default |
---|---|---|
enabled | bool | “ |
Source: samples/vrs/vrsrendermodule.h
(line 132, column 10)
ExecuteVRSImageGen
void ExecuteVRSImageGen(double deltaTime, cauldron::CommandList *pCmdList)
Parameters:
Name | Type | Default |
---|---|---|
deltaTime | double | “ |
pCmdList | cauldron::CommandList * | “ |
Source: samples/vrs/vrsrendermodule.h
(line 134, column 10)
CreatePipelineObject
uint32_t CreatePipelineObject(const cauldron::Surface *pSurface)
Parameters:
Name | Type | Default |
---|---|---|
pSurface | const cauldron::Surface * | “ |
Returns: uint32_t
Source: samples/vrs/vrsrendermodule.h
(line 137, column 14)
Variables
bool m_EnableVariableShading
bool m_EnableVariableShading = = false
Attributes: private
Source: samples/vrs/vrsrendermodule.h
(line 139, column 14)
uint32_t m_ShadingRateIndex
uint32_t m_ShadingRateIndex = = 0
Attributes: private
Source: samples/vrs/vrsrendermodule.h
(line 140, column 14)
uint32_t m_ShadingRateCombinerIndex
uint32_t m_ShadingRateCombinerIndex = = 0
Attributes: private
Source: samples/vrs/vrsrendermodule.h
(line 141, column 14)
bool m_EnableShadingRateImage
bool m_EnableShadingRateImage = = false
Attributes: private
Source: samples/vrs/vrsrendermodule.h
(line 142, column 14)
bool m_AllowAdditionalShadingRates
bool m_AllowAdditionalShadingRates = = false
Attributes: private
Source: samples/vrs/vrsrendermodule.h
(line 143, column 14)
uint32_t m_VRSTierSupported
uint32_t m_VRSTierSupported = = 0
Attributes: private
Source: samples/vrs/vrsrendermodule.h
(line 144, column 14)
float m_VRSThreshold
float m_VRSThreshold = = 0.015f
Attributes: private
Source: samples/vrs/vrsrendermodule.h
(line 145, column 14)
float m_VRSMotionFactor
float m_VRSMotionFactor = = 0.01f
Attributes: private
Source: samples/vrs/vrsrendermodule.h
(line 146, column 14)
bool m_VariableShadingEnabled
bool m_VariableShadingEnabled = = false
Attributes: private
Source: samples/vrs/vrsrendermodule.h
(line 148, column 10)
bool m_ShadingRateImageEnabled
bool m_ShadingRateImageEnabled = = false
Attributes: private
Source: samples/vrs/vrsrendermodule.h
(line 149, column 10)
std::vector<cauldron::ShadingRateCombiner> m_AvailableCombiners
std::vector<cauldron::ShadingRateCombiner> m_AvailableCombiners
Attributes: private
Source: samples/vrs/vrsrendermodule.h
(line 151, column 17)
cauldron::FeatureInfo_VRS m_FeatureInfoVRS
cauldron::FeatureInfo_VRS m_FeatureInfoVRS
Attributes: private
Source: samples/vrs/vrsrendermodule.h
(line 152, column 35)
const cauldron::Texture * m_pMotionVectors
const cauldron::Texture * m_pMotionVectors = = nullptr
Attributes: private
Source: samples/vrs/vrsrendermodule.h
(line 154, column 29)
const cauldron::Texture * m_pDepthTarget
const cauldron::Texture * m_pDepthTarget = = nullptr
Attributes: private
Source: samples/vrs/vrsrendermodule.h
(line 155, column 29)
const cauldron::Texture * m_pColorTarget
const cauldron::Texture * m_pColorTarget = = nullptr
Attributes: private
Source: samples/vrs/vrsrendermodule.h
(line 156, column 29)
const cauldron::Texture * m_pHistoryColorBuffer
const cauldron::Texture * m_pHistoryColorBuffer = = nullptr
Attributes: private
Source: samples/vrs/vrsrendermodule.h
(line 157, column 29)
const cauldron::Texture * m_pVRSTexture
const cauldron::Texture * m_pVRSTexture = = nullptr
Attributes: private
Source: samples/vrs/vrsrendermodule.h
(line 158, column 29)
FfxVrsContextDescription m_InitializationParameters
FfxVrsContextDescription m_InitializationParameters = = {}
Attributes: private
Source: samples/vrs/vrsrendermodule.h
(line 161, column 30)
FfxVrsContext m_VRSContext
FfxVrsContext m_VRSContext
Attributes: private
Source: samples/vrs/vrsrendermodule.h
(line 162, column 30)
bool m_ContextCreated
bool m_ContextCreated = = false
Attributes: private
Source: samples/vrs/vrsrendermodule.h
(line 163, column 30)
bool m_GenerateMotionVectors
bool m_GenerateMotionVectors = = false
Attributes: private
Source: samples/vrs/vrsrendermodule.h
(line 166, column 33)
cauldron::RootSignature * m_pMotionVectorsRootSignature
cauldron::RootSignature * m_pMotionVectorsRootSignature = = nullptr
Attributes: private
Source: samples/vrs/vrsrendermodule.h
(line 167, column 32)
cauldron::ParameterSet * m_pMotionVectorsParameterSet
cauldron::ParameterSet * m_pMotionVectorsParameterSet = = nullptr
Attributes: private
Source: samples/vrs/vrsrendermodule.h
(line 168, column 32)
const cauldron::RasterView * m_pMotionVectorsRasterView
const cauldron::RasterView * m_pMotionVectorsRasterView = = nullptr
Attributes: private
Source: samples/vrs/vrsrendermodule.h
(line 169, column 32)
const cauldron::RasterView * m_pDepthRasterView
const cauldron::RasterView * m_pDepthRasterView = = nullptr
Attributes: private
Source: samples/vrs/vrsrendermodule.h
(line 170, column 32)
std::mutex m_CriticalSection
std::mutex m_CriticalSection
Attributes: private
Source: samples/vrs/vrsrendermodule.h
(line 172, column 16)
std::vector<PipelineHashObject> m_PipelineHashObjects
std::vector<PipelineHashObject> m_PipelineHashObjects
Attributes: private
Source: samples/vrs/vrsrendermodule.h
(line 185, column 17)
std::vector<MotionVectorsRenderData> m_MotionVectorsRenderSurfaces
std::vector<MotionVectorsRenderData> m_MotionVectorsRenderSurfaces
Attributes: private
Source: samples/vrs/vrsrendermodule.h
(line 192, column 17)
cauldron::RootSignature * m_pOverlayRootSignature
cauldron::RootSignature * m_pOverlayRootSignature = = nullptr
Attributes: private
Source: samples/vrs/vrsrendermodule.h
(line 195, column 32)
const cauldron::RasterView * m_pOverlayRasterView
const cauldron::RasterView * m_pOverlayRasterView = = nullptr
Attributes: private
Source: samples/vrs/vrsrendermodule.h
(line 196, column 32)
cauldron::PipelineObject * m_pOverlayPipelineObj
cauldron::PipelineObject * m_pOverlayPipelineObj = = nullptr
Attributes: private
Source: samples/vrs/vrsrendermodule.h
(line 197, column 32)
const cauldron::Texture * m_pOverlayRenderTarget
const cauldron::Texture * m_pOverlayRenderTarget = = nullptr
Attributes: private
Source: samples/vrs/vrsrendermodule.h
(line 198, column 32)
cauldron::ParameterSet * m_pOverlayParameters
cauldron::ParameterSet * m_pOverlayParameters = = nullptr
Attributes: private
Source: samples/vrs/vrsrendermodule.h
(line 199, column 32)
bool m_DrawOverlay
bool m_DrawOverlay = = false
Attributes: private
Source: samples/vrs/vrsrendermodule.h
(line 200, column 33)
Dependencies: FfxVrsContext, FfxVrsContextDescription