diff options
author | RunitaiLinden <davep@lindenlab.com> | 2023-06-15 14:52:17 -0500 |
---|---|---|
committer | RunitaiLinden <davep@lindenlab.com> | 2023-06-15 14:52:17 -0500 |
commit | 6f767db34992b04d67cb25bf976581aee4acac78 (patch) | |
tree | 38aff025d05613899ce4cca1a6465550ad44f005 /indra/newview/pipeline.cpp | |
parent | 47be24e467a9fe5a2c0466a49f58769f6b81fdc4 (diff) | |
parent | 44f26248ec668635b5d5b161f4736a670d364792 (diff) |
Merge branch 'DRTVWR-559' of github.com:secondlife/viewer into DRTVWR-559
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r-- | indra/newview/pipeline.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index c88b8b42ff..38f27d4dfa 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -195,6 +195,7 @@ S32 LLPipeline::RenderScreenSpaceReflectionIterations; F32 LLPipeline::RenderScreenSpaceReflectionRayStep; F32 LLPipeline::RenderScreenSpaceReflectionDistanceBias; F32 LLPipeline::RenderScreenSpaceReflectionDepthRejectBias; +F32 LLPipeline::RenderScreenSpaceReflectionAdaptiveStepMultiplier; S32 LLPipeline::RenderScreenSpaceReflectionGlossySamples; S32 LLPipeline::RenderBufferVisualization; LLTrace::EventStatHandle<S64> LLPipeline::sStatBatchSize("renderbatchsize"); @@ -334,6 +335,7 @@ LLPipeline::LLPipeline() : mTextureMatrixOps(0), mNumVisibleNodes(0), mNumVisibleFaces(0), + mPoissonOffset(0), mInitialized(false), mShadersLoaded(false), @@ -552,7 +554,8 @@ void LLPipeline::init() connectRefreshCachedSettingsSafe("RenderScreenSpaceReflectionRayStep"); connectRefreshCachedSettingsSafe("RenderScreenSpaceReflectionDistanceBias"); connectRefreshCachedSettingsSafe("RenderScreenSpaceReflectionDepthRejectBias"); - connectRefreshCachedSettingsSafe("RenderScreenSpaceReflectionsGlossySamples"); + connectRefreshCachedSettingsSafe("RenderScreenSpaceReflectionAdaptiveStepMultiplier"); + connectRefreshCachedSettingsSafe("RenderScreenSpaceReflectionGlossySamples"); connectRefreshCachedSettingsSafe("RenderBufferVisualization"); gSavedSettings.getControl("RenderAutoHideSurfaceAreaLimit")->getCommitSignal()->connect(boost::bind(&LLPipeline::refreshCachedSettings)); } @@ -1039,6 +1042,7 @@ void LLPipeline::refreshCachedSettings() RenderScreenSpaceReflectionRayStep = gSavedSettings.getF32("RenderScreenSpaceReflectionRayStep"); RenderScreenSpaceReflectionDistanceBias = gSavedSettings.getF32("RenderScreenSpaceReflectionDistanceBias"); RenderScreenSpaceReflectionDepthRejectBias = gSavedSettings.getF32("RenderScreenSpaceReflectionDepthRejectBias"); + RenderScreenSpaceReflectionAdaptiveStepMultiplier = gSavedSettings.getF32("RenderScreenSpaceReflectionAdaptiveStepMultiplier"); RenderScreenSpaceReflectionGlossySamples = gSavedSettings.getS32("RenderScreenSpaceReflectionGlossySamples"); RenderBufferVisualization = gSavedSettings.getS32("RenderBufferVisualization"); sReflectionProbesEnabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderReflectionsEnabled") && gSavedSettings.getBOOL("RenderReflectionsEnabled"); @@ -8436,6 +8440,13 @@ void LLPipeline::bindReflectionProbes(LLGLSLShader& shader) shader.uniform1f(LLShaderMgr::DEFERRED_SSR_RAY_STEP, RenderScreenSpaceReflectionRayStep); shader.uniform1f(LLShaderMgr::DEFERRED_SSR_GLOSSY_SAMPLES, RenderScreenSpaceReflectionGlossySamples); shader.uniform1f(LLShaderMgr::DEFERRED_SSR_REJECT_BIAS, RenderScreenSpaceReflectionDepthRejectBias); + mPoissonOffset++; + + if (mPoissonOffset > 128 - RenderScreenSpaceReflectionGlossySamples) + mPoissonOffset = 0; + + shader.uniform1f(LLShaderMgr::DEFERRED_SSR_NOISE_SINE, mPoissonOffset); + shader.uniform1f(LLShaderMgr::DEFERRED_SSR_ADAPTIVE_STEP_MULT, RenderScreenSpaceReflectionAdaptiveStepMultiplier); channel = shader.enableTexture(LLShaderMgr::SCENE_DEPTH); if (channel > -1) |