r.ManyLights.WaveOps
r.ManyLights.WaveOps
#Overview
name: r.ManyLights.WaveOps
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Whether to use wave ops. Useful for debugging.
It is referenced in 3
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of r.ManyLights.WaveOps is to control whether wave operations are used in the Many Lights rendering system. This setting is primarily for the rendering system, specifically for optimizing light calculations.
This setting variable is relied upon by the Renderer module, particularly in the Many Lights subsystem. It’s used within the ManyLights namespace in the Renderer’s private implementation.
The value of this variable is set through a console variable (CVarManyLightsWaveOps) with a default value of 1 (enabled). It can be modified at runtime through console commands or programmatically.
The associated variable CVarManyLightsWaveOps directly interacts with r.ManyLights.WaveOps. They share the same value and purpose.
Developers must be aware that this variable is used to determine whether wave operations should be employed in the Many Lights rendering system. It’s important to note that the actual use of wave operations depends not only on this setting but also on hardware support (GRHISupportsWaveOperations) and shader platform support (RHISupportsWaveOperations).
Best practices when using this variable include:
- Only disable it for debugging purposes, as wave operations typically improve performance.
- Consider the target hardware and shader platforms when modifying this setting, as not all platforms support wave operations.
- Be aware that changing this setting may affect rendering performance and potentially visual output.
Regarding the associated variable CVarManyLightsWaveOps: This is a console variable that directly controls the r.ManyLights.WaveOps setting. It’s defined as an integer with a default value of 1 (enabled). The variable is marked with ECVF_Scalability and ECVF_RenderThreadSafe flags, indicating it affects scalability and is safe to modify on the render thread.
The purpose of CVarManyLightsWaveOps is to provide a runtime-modifiable interface for the r.ManyLights.WaveOps setting. It’s used in the UseWaveOps function to determine whether wave operations should be employed, in conjunction with hardware and shader platform support checks.
Developers should be aware that modifying this console variable will directly affect the behavior of the Many Lights rendering system. It’s primarily intended for debugging purposes, as indicated by its description.
Best practices for using CVarManyLightsWaveOps include:
- Use it for debugging or performance testing scenarios.
- Be cautious when disabling it in production builds, as it may negatively impact performance.
- Consider creating project-specific presets or configurations that include this setting for different quality levels or debugging scenarios.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/ManyLights/ManyLights.cpp:75
Scope: file
Source code excerpt:
static TAutoConsoleVariable<int32> CVarManyLightsWaveOps(
TEXT("r.ManyLights.WaveOps"),
1,
TEXT("Whether to use wave ops. Useful for debugging."),
ECVF_Scalability | ECVF_RenderThreadSafe
);
static TAutoConsoleVariable<int32> CVarManyLightsDebug(
#Associated Variable and Callsites
This variable is associated with another variable named CVarManyLightsWaveOps
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/ManyLights/ManyLights.cpp:74
Scope: file
Source code excerpt:
);
static TAutoConsoleVariable<int32> CVarManyLightsWaveOps(
TEXT("r.ManyLights.WaveOps"),
1,
TEXT("Whether to use wave ops. Useful for debugging."),
ECVF_Scalability | ECVF_RenderThreadSafe
);
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/ManyLights/ManyLights.cpp:207
Scope (from outer to inner):
file
namespace ManyLights
function bool UseWaveOps
Source code excerpt:
bool UseWaveOps(EShaderPlatform ShaderPlatform)
{
return CVarManyLightsWaveOps.GetValueOnRenderThread() != 0
&& GRHISupportsWaveOperations
&& RHISupportsWaveOperations(ShaderPlatform);
}
void ModifyCompilationEnvironment(EShaderPlatform Platform, FShaderCompilerEnvironment& OutEnvironment)
{