diff options
author | Dave Parks <davep@lindenlab.com> | 2022-05-24 10:34:47 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-05-24 10:34:47 -0500 |
commit | 0940e8871894e08da80730d11c31cbd252a05b35 (patch) | |
tree | a73b1ce8c7539c0c71d3eb4670e77311507a56f0 /indra/newview/pipeline.cpp | |
parent | 6eaf8521abae0deeb1162f9c61747183110176b0 (diff) |
SL-17472 Add checkbox to preferences for enabling "PBR" that uses "class3" deferred shaders. Move reflection probe shaders to class3 and restore class2 shaders to non-reflection probe versions.
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r-- | indra/newview/pipeline.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 2790628a46..55819449c6 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -351,6 +351,7 @@ bool LLPipeline::sRenderFrameTest = false; bool LLPipeline::sRenderAttachedLights = true; bool LLPipeline::sRenderAttachedParticles = true; bool LLPipeline::sRenderDeferred = false; +bool LLPipeline::sRenderPBR = false; S32 LLPipeline::sVisibleLightCount = 0; bool LLPipeline::sRenderingHUDs; F32 LLPipeline::sDistortionWaterClipPlaneMargin = 1.0125f; @@ -541,6 +542,7 @@ void LLPipeline::init() connectRefreshCachedSettingsSafe("UseOcclusion"); connectRefreshCachedSettingsSafe("WindLightUseAtmosShaders"); connectRefreshCachedSettingsSafe("RenderDeferred"); + connectRefreshCachedSettingsSafe("RenderPBR"); connectRefreshCachedSettingsSafe("RenderDeferredSunWash"); connectRefreshCachedSettingsSafe("RenderFSAASamples"); connectRefreshCachedSettingsSafe("RenderResolutionDivisor"); @@ -1025,6 +1027,7 @@ void LLPipeline::updateRenderDeferred() LLPipeline::sRenderBump && WindLightUseAtmosShaders && (bool) LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred"); + sRenderPBR = sRenderDeferred && gSavedSettings.getBOOL("RenderPBR"); } // static @@ -2597,6 +2600,7 @@ void LLPipeline::doOcclusion(LLCamera& camera, LLRenderTarget& source, LLRenderT void LLPipeline::doOcclusion(LLCamera& camera) { LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE; + LL_PROFILE_GPU_ZONE("doOcclusion"); if (LLPipeline::sUseOcclusion > 1 && !LLSpatialPartition::sTeleportRequested && (sCull->hasOcclusionGroups() || LLVOCachePartition::sNeedsOcclusionCheck)) { @@ -9633,7 +9637,7 @@ static LLTrace::BlockTimerStatHandle FTM_SHADOW_FULLBRIGHT_ALPHA_MASKED("Fullbri void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera& shadow_cam, LLCullResult& result, bool use_shader, bool use_occlusion, U32 target_width) { LL_PROFILE_ZONE_SCOPED_CATEGORY_PIPELINE; //LL_RECORD_BLOCK_TIME(FTM_SHADOW_RENDER); - + LL_PROFILE_GPU_ZONE("renderShadow"); //disable occlusion culling for shadow passes (save setting to restore later) S32 occlude = LLPipeline::sUseOcclusion; if (!use_occlusion) @@ -9720,7 +9724,7 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera } LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("shadow simple"); //LL_RECORD_BLOCK_TIME(FTM_SHADOW_SIMPLE); - + LL_PROFILE_GPU_ZONE("shadow simple"); gGL.getTexUnit(0)->disable(); for (U32 i = 0; i < sizeof(types) / sizeof(U32); ++i) { @@ -9753,7 +9757,7 @@ void LLPipeline::renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera { LL_PROFILE_ZONE_NAMED_CATEGORY_PIPELINE("shadow alpha"); //LL_RECORD_BLOCK_TIME(FTM_SHADOW_ALPHA); - + LL_PROFILE_GPU_ZONE("shadow alpha"); for (int i = 0; i < 2; ++i) { bool rigged = i == 1; |