diff options
author | Cosmic Linden <cosmic@lindenlab.com> | 2024-02-21 12:53:10 -0800 |
---|---|---|
committer | Cosmic Linden <cosmic@lindenlab.com> | 2024-02-21 12:53:10 -0800 |
commit | 589910f445efa9690b543a37b9e2e14792a0e133 (patch) | |
tree | 1764a2b2f9e5e81e5101e6b59422f4a4e06868aa /indra/newview/app_settings | |
parent | bbc7d63a79b9744acaff51315e5e9a9d7299bd12 (diff) |
secondlife/viewer-issues#72: Fix material preview affecting exposure on main screen
Diffstat (limited to 'indra/newview/app_settings')
-rw-r--r-- | indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl b/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl index 9ac4ceb37e..eff7221ae7 100644 --- a/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl +++ b/indra/newview/app_settings/shaders/class1/deferred/exposureF.glsl @@ -28,7 +28,9 @@ out vec4 frag_color; uniform sampler2D emissiveRect; +#ifdef USE_LAST_EXPOSURE uniform sampler2D exposureMap; +#endif uniform float dt; uniform vec2 noiseVec; @@ -51,10 +53,12 @@ void main() L /= max_L; L = pow(L, 2.0); float s = mix(dynamic_exposure_params.z, dynamic_exposure_params.y, L); - + +#ifdef USE_LAST_EXPOSURE float prev = texture(exposureMap, vec2(0.5,0.5)).r; s = mix(prev, s, min(dt*2.0*abs(prev-s), 0.04)); +#endif frag_color = max(vec4(s, s, s, dt), vec4(0.0)); } |