summaryrefslogtreecommitdiff
path: root/indra/newview/pipeline.cpp
diff options
context:
space:
mode:
authorRunitaiLinden <davep@lindenlab.com>2023-04-11 15:09:58 -0500
committerGitHub <noreply@github.com>2023-04-11 15:09:58 -0500
commit2b2154f0217758b27b544d066024d922ba234d51 (patch)
treefafed45d3e9cc21b04e2babf6bf19d1a476fc88a /indra/newview/pipeline.cpp
parent474739226433a74cdca05a949586139a9c9c0bbd (diff)
SL-19564 Rebalance exposure and sky. Hack legacy diffuse map saturation and brightness to allow ACES Hill all the time.
Diffstat (limited to 'indra/newview/pipeline.cpp')
-rw-r--r--indra/newview/pipeline.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index e4ffa5b6b0..4266c16f94 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -7336,13 +7336,13 @@ void LLPipeline::renderFinalize()
mLastExposure.bindTexture(0, channel);
}
+ static LLStaticHashedString dt("dt");
+ static LLStaticHashedString noiseVec("noiseVec");
+ static LLStaticHashedString dynamic_exposure_params("dynamic_exposure_params");
static LLCachedControl<F32> dynamic_exposure_coefficient(gSavedSettings, "RenderDynamicExposureCoefficient", 0.175f);
static LLCachedControl<F32> dynamic_exposure_min(gSavedSettings, "RenderDynamicExposureMin", 0.125f);
static LLCachedControl<F32> dynamic_exposure_max(gSavedSettings, "RenderDynamicExposureMax", 1.3f);
- static LLStaticHashedString dt("dt");
- static LLStaticHashedString noiseVec("noiseVec");
- static LLStaticHashedString dynamic_exposure_params("dynamic_exposure_params");
gExposureProgram.uniform1f(dt, gFrameIntervalSeconds);
gExposureProgram.uniform2f(noiseVec, ll_frand() * 2.0 - 1.0, ll_frand() * 2.0 - 1.0);
gExposureProgram.uniform3f(dynamic_exposure_params, dynamic_exposure_coefficient, dynamic_exposure_min, dynamic_exposure_max);
@@ -7370,7 +7370,7 @@ void LLPipeline::renderFinalize()
gDeferredPostGammaCorrectProgram.bindTexture(LLShaderMgr::DEFERRED_DIFFUSE, screenTarget(), false, LLTexUnit::TFO_POINT);
- gDeferredPostGammaCorrectProgram.bindTexture(LLShaderMgr::EXPOSURE_MAP, &mExposureMap);
+ gDeferredPostGammaCorrectProgram.bindTexture(LLShaderMgr::EXPOSURE_MAP, &mExposureMap);
gDeferredPostGammaCorrectProgram.uniform2f(LLShaderMgr::DEFERRED_SCREEN_RES, screenTarget()->getWidth(), screenTarget()->getHeight());
@@ -9466,6 +9466,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
set_current_projection(saved_proj);
LLVector3 eye = camera.getOrigin();
+ llassert(eye.isFinite());
//camera used for shadow cull/render
LLCamera shadow_cam;
@@ -9745,6 +9746,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
{
//get perspective projection
view[j] = view[j].inverse();
+ //llassert(origin.isFinite());
glh::vec3f origin_agent(origin.mV);
@@ -9752,7 +9754,7 @@ void LLPipeline::generateSunShadow(LLCamera& camera)
view[j].mult_matrix_vec(origin_agent);
eye = LLVector3(origin_agent.v);
-
+ //llassert(eye.isFinite());
if (!hasRenderDebugMask(LLPipeline::RENDER_DEBUG_SHADOW_FRUSTA) && !gCubeSnapshot)
{
mShadowFrustOrigin[j] = eye;