r.MaterialEditor.LWCEnabled
r.MaterialEditor.LWCEnabled
#Overview
name: r.MaterialEditor.LWCEnabled
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Enable generation of LWC values in materials. If disabled, materials will perform all operations at float-precision
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/Materials/HLSLMaterialTranslator.cpp:179
Scope: file
Source code excerpt:
static int32 GLWCEnabled = 1;
static FAutoConsoleVariableRef CVarLWCEnabled(
TEXT("r.MaterialEditor.LWCEnabled"),
GLWCEnabled,
TEXT("Enable generation of LWC values in materials. If disabled, materials will perform all operations at float-precision")
);
static bool GPedanticErrorChecksEnabled = false;
static FAutoConsoleVariableRef CVarPedanticErrorChecksEnabled(
#Loc: <Workspace>/Engine/Source/Runtime/Engine/Private/Materials/MaterialHLSLEmitter.cpp:615
Scope (from outer to inner):
file
function static void GetMaterialEnvironment
Source code excerpt:
}
//static TConsoleVariableData<int32>* CVarLWCEnabled = IConsoleManager::Get().FindTConsoleVariableDataInt(TEXT("r.MaterialEditor.LWCEnabled"));
static IConsoleVariable* CVarLWCIsEnabled = IConsoleManager::Get().FindConsoleVariable(TEXT("r.MaterialEditor.LWCEnabled"));
OutEnvironment.SetDefine(TEXT("MATERIAL_LWC_ENABLED"), CVarLWCIsEnabled->GetInt() ? TEXT("1") : TEXT("0"));
OutEnvironment.SetDefine(TEXT("WSVECTOR_IS_TILEOFFSET"), TEXT("1"));
OutEnvironment.SetDefine(TEXT("WSVECTOR_IS_DOUBLEFLOAT"), TEXT("0"));
if (InMaterial.GetMaterialDomain() == MD_Volume) // && Material->HasN)
{