r.RayTracing.Shadows.EnableMaterials
r.RayTracing.Shadows.EnableMaterials
#Overview
name: r.RayTracing.Shadows.EnableMaterials
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Enables material shader binding for shadow rays. If this is disabled, then a default trivial shader is used. (default = 1)
It is referenced in 2
C++ source files.
#Summary
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/RayTracing/RayTracingShadows.cpp:31
Scope: file
Source code excerpt:
static int32 GRayTracingShadowsEnableMaterials = 1;
static FAutoConsoleVariableRef CVarRayTracingShadowsEnableMaterials(
TEXT("r.RayTracing.Shadows.EnableMaterials"),
GRayTracingShadowsEnableMaterials,
TEXT("Enables material shader binding for shadow rays. If this is disabled, then a default trivial shader is used. (default = 1)"),
ECVF_RenderThreadSafe
);
static float GRayTracingShadowsAvoidSelfIntersectionTraceDistance = 0.0f;
#Loc: <Workspace>/Engine/Source/Runtime/Renderer/Private/RayTracing/RayTracingMaterialHitShaders.cpp:657
Scope (from outer to inner):
file
function FRayTracingPipelineState* FDeferredShadingSceneRenderer::CreateRayTracingMaterialPipeline
Source code excerpt:
const bool bMaterialsCompiled = GCompileRayTracingMaterialAHS || GCompileRayTracingMaterialCHS;
const bool bEnableMaterials = bMaterialsCompiled && GEnableRayTracingMaterials != 0;
static auto CVarEnableShadowMaterials = IConsoleManager::Get().FindConsoleVariable(TEXT("r.RayTracing.Shadows.EnableMaterials"));
const bool bEnableShadowMaterials = bMaterialsCompiled && (CVarEnableShadowMaterials ? CVarEnableShadowMaterials->GetInt() != 0 : true);
FRHIRayTracingShader* OpaqueShadowShader = bIsPathTracing ? GetPathTracingDefaultOpaqueHitShader(View.ShaderMap) : GetRayTracingDefaultOpaqueShader(View.ShaderMap);
FRHIRayTracingShader* HiddenMaterialShader = bIsPathTracing ? GetPathTracingDefaultHiddenHitShader(View.ShaderMap) : GetRayTracingDefaultHiddenShader(View.ShaderMap);
FRHIRayTracingShader* OpaqueMeshDecalHitShader = GetDefaultOpaqueMeshDecalHitShader(View.ShaderMap);