diff options
author | RunitaiLinden <davep@lindenlab.com> | 2023-04-21 11:19:14 -0500 |
---|---|---|
committer | RunitaiLinden <davep@lindenlab.com> | 2023-04-21 11:19:14 -0500 |
commit | 5c903d9c953e422a95ccd88b345d803b60ce65ff (patch) | |
tree | 2fd6c8f8bad854d15b8845e0fc0c033dae32798a /indra | |
parent | d07eaf930269c71e0e3e19c8b61bcf0acbaa6fb6 (diff) |
DRTVWR-559 Don't use automatic probes on water (fixes lots of visual artifacts)
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl | 19 | ||||
-rw-r--r-- | indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml | 2 |
2 files changed, 17 insertions, 4 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl b/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl index 36b5262104..9b42f0df5c 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl @@ -651,12 +651,11 @@ vec3 sampleProbeAmbient(vec3 pos, vec3 dir) return col[1]+col[0]; } -void sampleReflectionProbes(inout vec3 ambenv, inout vec3 glossenv, +void doProbeSample(inout vec3 ambenv, inout vec3 glossenv, vec2 tc, vec3 pos, vec3 norm, float glossiness) { // TODO - don't hard code lods float reflection_lods = max_probe_lod; - preProbeSample(pos); vec3 refnormpersp = reflect(pos.xyz, norm.xyz); @@ -676,10 +675,24 @@ void sampleReflectionProbes(inout vec3 ambenv, inout vec3 glossenv, #endif } +void sampleReflectionProbes(inout vec3 ambenv, inout vec3 glossenv, + vec2 tc, vec3 pos, vec3 norm, float glossiness) +{ + preProbeSample(pos); + doProbeSample(ambenv, glossenv, tc, pos, norm, glossiness); +} + void sampleReflectionProbesWater(inout vec3 ambenv, inout vec3 glossenv, vec2 tc, vec3 pos, vec3 norm, float glossiness) { - sampleReflectionProbes(ambenv, glossenv, tc, pos, norm, glossiness); + // don't sample automatic probes for water + sample_automatic = false; + preProbeSample(pos); + sample_automatic = true; + // always include void probe on water + probeIndex[probeInfluences++] = 0; + + doProbeSample(ambenv, glossenv, tc, pos, norm, glossiness); // fudge factor to get PBR water at a similar luminance ot legacy water glossenv *= 0.4; diff --git a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml index d867123c4b..22e889a99c 100644 --- a/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml +++ b/indra/newview/skins/default/xui/en/floater_preferences_graphics_advanced.xml @@ -729,7 +729,7 @@ name="1" value="1"/> <combo_box.item - label="Manual + terrain and water" + label="Manual + terrain" name="2" value="2"/> <combo_box.item |