diff options
author | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2023-06-15 09:31:15 -0700 |
---|---|---|
committer | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2023-06-15 09:31:15 -0700 |
commit | 5dedf6d75389772b88c140695ac421699b24fd81 (patch) | |
tree | 611122555332b311b3d4d97ca637fc4296acf65e /indra/newview/app_settings/shaders/class3/deferred/screenSpaceReflUtil.glsl | |
parent | 22f83b3436129e3198fcdd24ccb30baf253955c7 (diff) |
Skip samples that are in vignette, and glossiness under a value.
SL-19784
Diffstat (limited to 'indra/newview/app_settings/shaders/class3/deferred/screenSpaceReflUtil.glsl')
-rw-r--r-- | indra/newview/app_settings/shaders/class3/deferred/screenSpaceReflUtil.glsl | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/screenSpaceReflUtil.glsl b/indra/newview/app_settings/shaders/class3/deferred/screenSpaceReflUtil.glsl index 1b822d6a21..b2d1e75d04 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/screenSpaceReflUtil.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/screenSpaceReflUtil.glsl @@ -332,6 +332,7 @@ collectedColor = vec4(1, 0, 1, 1); float zFar = 128.0; vignette *= clamp(1.0+(viewPos.z/zFar), 0.0, 1.0); + vignette *= clamp(glossiness * 3 - 1.7, 0, 1); vec4 hitpoint; @@ -340,8 +341,9 @@ collectedColor = vec4(1, 0, 1, 1); totalSamples = int(max(glossySampleCount, glossySampleCount * glossiness * vignette)); totalSamples = max(totalSamples, 1); - + if (glossiness < 0.35) { + if (vignette > 0) { for (int i = 0; i < totalSamples; i++) { @@ -363,15 +365,15 @@ collectedColor = vec4(1, 0, 1, 1); collectedColor.a += 1; } } - } - - if (hits > 0) - { - collectedColor /= hits; - } - else - { - collectedColor = vec4(0); + + if (hits > 0) + { + collectedColor /= hits; + } + else + { + collectedColor = vec4(0); + } } } float hitAlpha = hits; |