![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include "ContrastAdaptiveImageGenerator.h"#include "StereoRenderTargetManager.h"#include "GlobalShader.h"#include "ShaderParameterUtils.h"#include "RenderGraphUtils.h"#include "RHI.h"#include "RHIDefinitions.h"#include "RenderTargetPool.h"#include "SystemTextures.h"#include "SceneRendering.h"#include "SceneTextures.h"#include "SceneView.h"#include "IEyeTracker.h"#include "IHeadMountedDisplay.h"#include "IXRTrackingSystem.h"#include "Engine/Engine.h"#include "UnrealClient.h"#include "PostProcess/PostProcessTonemap.h"#include "DataDrivenShaderPlatformInfo.h"Classes | |
| class | FCalculateShadingRateImageCS |
| class | FRescaleVariableRateShadingCS |
| struct | FCASImageData |
| struct | FCASImageData::FCASImageSet |
Namespaces | |
| namespace | ESRITextureType |
| namespace | ESRIPreviewType |
Functions | |
| IMPLEMENT_GLOBAL_SHADER (FCalculateShadingRateImageCS, "/Engine/Private/VariableRateShading/VRSShadingRateCalculate.usf", "CalculateShadingRateImage", SF_Compute) | |
| IMPLEMENT_GLOBAL_SHADER (FRescaleVariableRateShadingCS, "/Engine/Private/VariableRateShading/VRSShadingRateReproject.usf", "RescaleVariableRateShading", SF_Compute) | |
| RDG_REGISTER_BLACKBOARD_STRUCT (FCASImageData) | |
| void | AddCreateShadingRateImagePass (FRDGBuilder &GraphBuilder, const FSceneViewFamily &ViewFamily, bool bCreateHardwareImages, bool bCreateSoftwareImages) |
| void | AddReprojectImageBasedVRSPass (FRDGBuilder &GraphBuilder, const FMinimalSceneTextures &SceneTextures, const FSceneViewFamily &ViewFamily, bool bReprojectSoftwareImages) |
Variables | |
| TAutoConsoleVariable< int32 > | CVarCASContrastAdaptiveShading (TEXT("r.VRS.ContrastAdaptiveShading"), 0, TEXT("Enables using Variable Rate Shading based on the luminance from the previous frame's post process output \n"), ECVF_RenderThreadSafe) |
| TAutoConsoleVariable< float > | CVarCASEdgeThreshold (TEXT("r.VRS.ContrastAdaptiveShading.EdgeThreshold"), 0.2, TEXT(""), ECVF_RenderThreadSafe) |
| TAutoConsoleVariable< float > | CVarCASConservativeEdgeThreshold (TEXT("r.VRS.ContrastAdaptiveShading.ConservativeEdgeThreshold"), 0.1, TEXT(""), ECVF_RenderThreadSafe) |
| TAutoConsoleVariable< float > | CVarCAS_HDR10CorrectionMultiplier (TEXT("r.VRS.ContrastAdaptiveShading.HDR10CorrectionMultiplier"), 0.55, TEXT("Approximation multiplier to account for how perceptual values are spread out in SDR vs HDR10\n"), ECVF_RenderThreadSafe) |
| TAutoConsoleVariable< int32 > | CVarCASPreview (TEXT("r.VRS.ContrastAdaptiveShading.Preview"), 1, TEXT("0 - off, 1 - on (default)"), ECVF_RenderThreadSafe) |
| void AddCreateShadingRateImagePass | ( | FRDGBuilder & | GraphBuilder, |
| const FSceneViewFamily & | ViewFamily, | ||
| bool | bCreateHardwareImages, | ||
| bool | bCreateSoftwareImages | ||
| ) |
| void AddReprojectImageBasedVRSPass | ( | FRDGBuilder & | GraphBuilder, |
| const FMinimalSceneTextures & | SceneTextures, | ||
| const FSceneViewFamily & | ViewFamily, | ||
| bool | bReprojectSoftwareImages | ||
| ) |
| IMPLEMENT_GLOBAL_SHADER | ( | FCalculateShadingRateImageCS | , |
| "/Engine/Private/VariableRateShading/VRSShadingRateCalculate.usf" | , | ||
| "CalculateShadingRateImage" | , | ||
| SF_Compute | |||
| ) |
| IMPLEMENT_GLOBAL_SHADER | ( | FRescaleVariableRateShadingCS | , |
| "/Engine/Private/VariableRateShading/VRSShadingRateReproject.usf" | , | ||
| "RescaleVariableRateShading" | , | ||
| SF_Compute | |||
| ) |
| RDG_REGISTER_BLACKBOARD_STRUCT | ( | FCASImageData | ) |
| TAutoConsoleVariable< float > CVarCAS_HDR10CorrectionMultiplier(TEXT("r.VRS.ContrastAdaptiveShading.HDR10CorrectionMultiplier"), 0.55, TEXT("Approximation multiplier to account for how perceptual values are spread out in SDR vs HDR10\n"), ECVF_RenderThreadSafe) | ( | TEXT("r.VRS.ContrastAdaptiveShading.HDR10CorrectionMultiplier") | , |
| 0. | 55, | ||
| TEXT("Approximation multiplier to account for how perceptual values are spread out in SDR vs HDR10\n") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| TAutoConsoleVariable< float > CVarCASConservativeEdgeThreshold(TEXT("r.VRS.ContrastAdaptiveShading.ConservativeEdgeThreshold"), 0.1, TEXT(""), ECVF_RenderThreadSafe) | ( | TEXT("r.VRS.ContrastAdaptiveShading.ConservativeEdgeThreshold") | , |
| 0. | 1, | ||
| TEXT("") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| TAutoConsoleVariable< int32 > CVarCASContrastAdaptiveShading(TEXT("r.VRS.ContrastAdaptiveShading"), 0, TEXT("Enables using Variable Rate Shading based on the luminance from the previous frame's post process output \n"), ECVF_RenderThreadSafe) | ( | TEXT("r.VRS.ContrastAdaptiveShading") | , |
| 0 | , | ||
| TEXT("Enables using Variable Rate Shading based on the luminance from the previous frame's post process output \n") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
Contrast Adaptive Shading (CAS) is a Tier 2 Variable Rate Shading method which generates a shading rate image (SRI) by examining the contrast from the previous frame. An image is generated which designates lower shading rates for areas of lower contrast in which reductions are unlikely to be noticed. This image is then reprojected and rescaled in accordance with camera movement and dynamic resolution changes before being provided to the manager. CAS Parameters
| TAutoConsoleVariable< float > CVarCASEdgeThreshold(TEXT("r.VRS.ContrastAdaptiveShading.EdgeThreshold"), 0.2, TEXT(""), ECVF_RenderThreadSafe) | ( | TEXT("r.VRS.ContrastAdaptiveShading.EdgeThreshold") | , |
| 0. | 2, | ||
| TEXT("") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
| TAutoConsoleVariable< int32 > CVarCASPreview(TEXT("r.VRS.ContrastAdaptiveShading.Preview"), 1, TEXT("0 - off, 1 - on (default)"), ECVF_RenderThreadSafe) | ( | TEXT("r.VRS.ContrastAdaptiveShading.Preview") | , |
| 1 | , | ||
| TEXT("0 - off, 1 - on (default)") | , | ||
| ECVF_RenderThreadSafe | |||
| ) |
Debug Settings