diff options
author | cosmic-linden <111533034+cosmic-linden@users.noreply.github.com> | 2024-02-21 16:49:04 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-21 16:49:04 -0800 |
commit | 6a97433f3bd025fc0011bc4399b05ecbcc11d89a (patch) | |
tree | 595c349db5c0aa39992a4fb5412309d8b26ecf7a /indra/newview/app_settings | |
parent | 1552ee3a5d72a1d6b2dc536d033d4c2d8f2e74ee (diff) | |
parent | fc7abe8cb9ef737cb1ad4431e30c42f08d6e8899 (diff) |
Merge pull request #849 from secondlife/vi-72
secondlife/viewer-issues#72: Fix material preview making things disappear. General cleanup.
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)); } |