r.Nanite.ComputeMaterials

r.Nanite.ComputeMaterials

#Overview

name: r.Nanite.ComputeMaterials

This variable is created as a Console Variable (cvar).

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/Rendering/NaniteResources.cpp:70

Scope: file

Source code excerpt:


static TAutoConsoleVariable<int32> CVarNaniteUseComputeMaterials(
	TEXT("r.Nanite.ComputeMaterials"),
	1,
	TEXT("Whether to enable Nanite compute materials"),
	FConsoleVariableDelegate::CreateLambda([](IConsoleVariable* InVariable)
	{
		// Force recaching of Nanite draw commands when toggled.
		FGlobalComponentRecreateRenderStateContext Context;

#Loc: <Workspace>/Engine/Source/Runtime/RenderCore/Private/RenderUtils.cpp:1296

Scope (from outer to inner):

file
function     bool UseNaniteComputeMaterials

Source code excerpt:

bool UseNaniteComputeMaterials()
{
	static const auto UseComputeMaterials = IConsoleManager::Get().FindTConsoleVariableDataInt(TEXT("r.Nanite.ComputeMaterials"));
	return NaniteComputeMaterialsSupported() && !IsVulkanPlatform(GMaxRHIShaderPlatform) && !IsMetalPlatform(GMaxRHIShaderPlatform) /* TODO: Support CS derivatives */ && (UseComputeMaterials && UseComputeMaterials->GetValueOnRenderThread() != 0);
}

bool UseNaniteFastTileClear()
{
	static const IConsoleVariable* CVarNaniteFastTileClear = IConsoleManager::Get().FindConsoleVariable(TEXT("r.Nanite.FastTileClear"));