r.Lumen.TranslucencyReflections.ReprojectionRadiusScale
r.Lumen.TranslucencyReflections.ReprojectionRadiusScale
#Overview
name: r.Lumen.TranslucencyReflections.ReprojectionRadiusScale
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Larger values treat the Radiance Cache lighting as more distant.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.Lumen.TranslucencyReflections.ReprojectionRadiusScale
is to control how the Radiance Cache lighting is treated in terms of distance for translucency reflections in the Lumen global illumination system. Specifically, it scales the reprojection radius used when interpolating the Radiance Cache for translucency reflections.
This setting variable is primarily used by the Lumen translucency reflection system, which is part of Unreal Engine’s Lumen global illumination solution. It affects how the engine calculates and applies global illumination to translucent objects in the scene.
The value of this variable is set through the Unreal Engine console or configuration files. It’s defined as a float with a default value of 10.
This variable interacts closely with GLumenTranslucencyVolumeRadianceCacheClipmapFadeSize
, which controls the fade size of the Radiance Cache clipmap for translucency volumes.
Developers should be aware that:
- Larger values of this variable will treat the Radiance Cache lighting as if it were coming from more distant sources.
- This can affect the appearance of reflections on translucent objects, potentially making them appear smoother or more uniform.
- Adjusting this value may have performance implications, as it affects the sampling of the Radiance Cache.
Best practices when using this variable include:
- Fine-tuning it based on the specific needs of your scene and the desired appearance of translucent reflections.
- Testing different values to find the right balance between visual quality and performance.
- Considering the scale of your scene when setting this value, as larger scenes might benefit from higher values.
Regarding the associated variable GLumenTranslucencyVolumeRadianceCacheClipmapFadeSize
:
This variable controls the fade size of the Radiance Cache clipmap for translucency volumes. It’s used to calculate the inverse of the clipmap fade size, which is then used in the Radiance Cache interpolation parameters.
Developers should note that:
- This value is clamped between 0.001 and 16.0 to prevent division by zero and extreme values.
- Smaller values will result in a sharper transition between clipmap levels, while larger values will create a more gradual fade.
- This variable can affect the appearance of lighting on translucent volumes, potentially impacting visual quality and performance.
Best practices for this variable include:
- Adjusting it in tandem with
r.Lumen.TranslucencyReflections.ReprojectionRadiusScale
to achieve the desired balance of visual quality and performance. - Testing different values to find the optimal setting for your specific scene and rendering requirements.
- Being mindful of its impact on memory usage and rendering performance, especially in scenes with many translucent objects.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenTranslucencyRadianceCache.cpp:32
Scope: file
Source code excerpt:
float GLumenTranslucencyReflectionsRadianceCacheReprojectionRadiusScale = 10;
FAutoConsoleVariableRef CVarLumenTranslucencyRadianceCacheReprojectionRadiusScale(
TEXT("r.Lumen.TranslucencyReflections.ReprojectionRadiusScale"),
GLumenTranslucencyReflectionsRadianceCacheReprojectionRadiusScale,
TEXT("Larger values treat the Radiance Cache lighting as more distant."),
ECVF_Scalability | ECVF_RenderThreadSafe
);
float GLumenTranslucencyVolumeRadianceCacheClipmapFadeSize = 4.0f;
#Associated Variable and Callsites
This variable is associated with another variable named GLumenTranslucencyReflectionsRadianceCacheReprojectionRadiusScale
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenScreenProbeGather.cpp:2142
Scope (from outer to inner):
file
function FSSDSignalTextures FDeferredShadingSceneRenderer::RenderLumenScreenProbeGather
Source code excerpt:
View.GetOwnLumenTranslucencyGIVolume().RadianceCacheInterpolationParameters = RadianceCacheParameters;
extern float GLumenTranslucencyReflectionsRadianceCacheReprojectionRadiusScale;
extern float GLumenTranslucencyVolumeRadianceCacheClipmapFadeSize;
View.GetOwnLumenTranslucencyGIVolume().RadianceCacheInterpolationParameters.RadianceCacheInputs.ReprojectionRadiusScale = GLumenTranslucencyReflectionsRadianceCacheReprojectionRadiusScale;
View.GetOwnLumenTranslucencyGIVolume().RadianceCacheInterpolationParameters.RadianceCacheInputs.InvClipmapFadeSize = 1.0f / FMath::Clamp(GLumenTranslucencyVolumeRadianceCacheClipmapFadeSize, .001f, 16.0f);
}
}
else
{
RadianceCacheParameters = View.GetLumenTranslucencyGIVolume().RadianceCacheInterpolationParameters;
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/Lumen/LumenTranslucencyRadianceCache.cpp:30
Scope: file
Source code excerpt:
);
float GLumenTranslucencyReflectionsRadianceCacheReprojectionRadiusScale = 10;
FAutoConsoleVariableRef CVarLumenTranslucencyRadianceCacheReprojectionRadiusScale(
TEXT("r.Lumen.TranslucencyReflections.ReprojectionRadiusScale"),
GLumenTranslucencyReflectionsRadianceCacheReprojectionRadiusScale,
TEXT("Larger values treat the Radiance Cache lighting as more distant."),
ECVF_Scalability | ECVF_RenderThreadSafe
);
float GLumenTranslucencyVolumeRadianceCacheClipmapFadeSize = 4.0f;
FAutoConsoleVariableRef CVarLumenTranslucencyVolumeRadianceCacheClipmapFadeSize(