Added new "ShaderPrint" ShowFlag to fix Nanitestats and other shader printing showing up in thumbnails.

#jira FORT-474044
#rb kevin.ortegren, charles.deRousiers
#rnx
#preflight 627e7f810d2d1f6ed8d83fae

[CL 20221891 by tim doerries in ue5-main branch]
This commit is contained in:
tim doerries
2022-05-16 07:06:28 -04:00
parent c0efeb5f4f
commit 0a1a0125da
3 changed files with 6 additions and 1 deletions

View File

@@ -225,6 +225,8 @@ struct FEngineShowFlags
// TODO: Remove when Physical page pool size scales automatically with demand
SetVirtualShadowMapCaching(false);
SetShaderPrint(false);
}
void EnableAdvancedFeatures()

View File

@@ -428,5 +428,8 @@ SHOWFLAG_ALWAYS_ACCESSIBLE(LumenReuseShadowMaps, SFG_Lumen, NSLOCTEXT("UnrealEd"
/** Visualize Skin Cache */
SHOWFLAG_FIXED_IN_SHIPPING(0, VisualizeGPUSkinCache, SFG_Hidden, NSLOCTEXT("UnrealEd", "VisualizeGPUSkinCache", "Visualize GPU Skin Cache"))
/** Enables ShaderPrint functionality that is used for debug printing from shaders (e.g. 'Nanitestats' command). Disable this for certain editor rendering (e.g. thumbnail rendering) */
SHOWFLAG_ALWAYS_ACCESSIBLE(ShaderPrint, SFG_Developer, NSLOCTEXT("UnrealEd", "ShaderPrint", "Shader Print"))
#undef SHOWFLAG_ALWAYS_ACCESSIBLE
#undef SHOWFLAG_FIXED_IN_SHIPPING

View File

@@ -259,7 +259,7 @@ namespace ShaderPrint
bool IsEnabled(const FSceneView& View)
{
return IsEnabled() && IsSupported(View.GetShaderPlatform());
return IsEnabled() && View.Family->EngineShowFlags.ShaderPrint && IsSupported(View.GetShaderPlatform());
}
// Returns true if the default view exists and has shader debug rendering enabled (this needs to be checked before using a permutation that requires the shader draw parameters)