r.CreateShadersOnLoad
r.CreateShadersOnLoad
#Overview
name: r.CreateShadersOnLoad
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Whether to create shaders on load, which can reduce hitching, but use more memory. Otherwise they will be created as needed.
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/Engine/Private/ShaderCompiler/ShaderCompiler.cpp:2290
Scope: file
Source code excerpt:
ENGINE_API int32 GCreateShadersOnLoad = 0;
static FAutoConsoleVariableRef CVarCreateShadersOnLoad(
TEXT("r.CreateShadersOnLoad"),
GCreateShadersOnLoad,
TEXT("Whether to create shaders on load, which can reduce hitching, but use more memory. Otherwise they will be created as needed.")
);
static TAutoConsoleVariable<FString> CVarShaderOverrideDebugDir(
TEXT("r.OverrideShaderDebugDir"),
#Loc: <Workspace>/Engine/Source/Runtime/RenderCore/Private/ShaderCodeArchive.cpp:80
Scope (from outer to inner):
file
namespace anonymous
function bool IsCreateShadersOnLoadEnabled
Source code excerpt:
bool IsCreateShadersOnLoadEnabled()
{
static IConsoleVariable* CVar = IConsoleManager::Get().FindConsoleVariable(TEXT("r.CreateShadersOnLoad"));
return CVar && CVar->GetInt() != 0;
}
}
#endif // RHI_RAYTRACING
int32 FSerializedShaderArchive::FindShaderMapWithKey(const FSHAHash& Hash, uint32 Key) const