From 42ec639c860e172803753b9cb41ae9483305f2f8 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Wed, 12 Oct 2022 14:46:51 -0500 Subject: SL-18190 Remove water reflection detail combo box and reimplement "Transparent Water" checkbox. --- indra/newview/app_settings/high_graphics.xml | 41 --------------------- indra/newview/app_settings/low_graphics.xml | 41 --------------------- indra/newview/app_settings/mid_graphics.xml | 41 --------------------- indra/newview/app_settings/settings.xml | 2 +- .../shaders/class3/environment/underWaterF.glsl | 19 ++++++---- .../shaders/class3/environment/waterF.glsl | 7 ++++ indra/newview/app_settings/ultra_graphics.xml | 42 ---------------------- 7 files changed, 21 insertions(+), 172 deletions(-) delete mode 100644 indra/newview/app_settings/high_graphics.xml delete mode 100644 indra/newview/app_settings/low_graphics.xml delete mode 100644 indra/newview/app_settings/mid_graphics.xml delete mode 100644 indra/newview/app_settings/ultra_graphics.xml (limited to 'indra/newview/app_settings') diff --git a/indra/newview/app_settings/high_graphics.xml b/indra/newview/app_settings/high_graphics.xml deleted file mode 100644 index f64937f443..0000000000 --- a/indra/newview/app_settings/high_graphics.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/indra/newview/app_settings/low_graphics.xml b/indra/newview/app_settings/low_graphics.xml deleted file mode 100644 index b31a040d67..0000000000 --- a/indra/newview/app_settings/low_graphics.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/indra/newview/app_settings/mid_graphics.xml b/indra/newview/app_settings/mid_graphics.xml deleted file mode 100644 index 9c2c17fc60..0000000000 --- a/indra/newview/app_settings/mid_graphics.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index f183f49039..2eee9f2f25 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10306,7 +10306,7 @@ RenderReflectionDetail Comment - Detail of reflection render pass. + DEPRECATED -- use RenderTransparentWater and RenderReflectionProbeDetail -- Detail of reflection render pass. Persist 1 Type diff --git a/indra/newview/app_settings/shaders/class3/environment/underWaterF.glsl b/indra/newview/app_settings/shaders/class3/environment/underWaterF.glsl index 819e6dcf15..a5e0adf8fa 100644 --- a/indra/newview/app_settings/shaders/class3/environment/underWaterF.glsl +++ b/indra/newview/app_settings/shaders/class3/environment/underWaterF.glsl @@ -26,10 +26,12 @@ out vec4 frag_color; uniform sampler2D diffuseMap; -uniform sampler2D bumpMap; +uniform sampler2D bumpMap; + +#ifdef TRANSPARENT_WATER uniform sampler2D screenTex; -uniform sampler2D refTex; uniform sampler2D screenDepth; +#endif uniform vec4 fogCol; uniform vec3 lightDir; @@ -43,6 +45,7 @@ uniform float kd; uniform vec4 waterPlane; uniform vec3 eyeVec; uniform vec4 waterFogColor; +uniform vec3 waterFogColorLinear; uniform float waterFogKS; uniform vec2 screenRes; @@ -57,8 +60,8 @@ vec4 applyWaterFogViewLinear(vec3 pos, vec4 color); void main() { vec4 color; - - //get detail normals + + //get detail normals vec3 wave1 = texture2D(bumpMap, vec2(refCoord.w, view.w)).xyz*2.0-1.0; vec3 wave2 = texture2D(bumpMap, littleWave.xy).xyz*2.0-1.0; vec3 wave3 = texture2D(bumpMap, littleWave.zw).xyz*2.0-1.0; @@ -67,8 +70,12 @@ void main() //figure out distortion vector (ripply) vec2 distort = (refCoord.xy/refCoord.z) * 0.5 + 0.5; distort = distort+wavef.xy*refScale; - + +#ifdef TRANSPARENT_WATER vec4 fb = texture2D(screenTex, distort); - +#else + vec4 fb = vec4(waterFogColorLinear, 0.0); +#endif + frag_color = applyWaterFogViewLinear(vary_position, fb); } diff --git a/indra/newview/app_settings/shaders/class3/environment/waterF.glsl b/indra/newview/app_settings/shaders/class3/environment/waterF.glsl index 9793a0e786..a6517be433 100644 --- a/indra/newview/app_settings/shaders/class3/environment/waterF.glsl +++ b/indra/newview/app_settings/shaders/class3/environment/waterF.glsl @@ -55,8 +55,10 @@ vec3 pbrPunctual(vec3 diffuseColor, vec3 specularColor, uniform sampler2D bumpMap; uniform sampler2D bumpMap2; uniform float blend_factor; +#ifdef TRANSPARENT_WATER uniform sampler2D screenTex; uniform sampler2D screenDepth; +#endif uniform sampler2D refTex; @@ -73,6 +75,7 @@ uniform float fresnelScale; uniform float fresnelOffset; uniform float blurMultiplier; uniform vec4 waterFogColor; +uniform vec3 waterFogColorLinear; //bigWave is (refCoord.w, view.w); @@ -174,6 +177,7 @@ void main() vec2 distort2 = distort + waver.xy * refScale / max(dmod * df1, 1.0); distort2 = clamp(distort2, vec2(0), vec2(0.99)); +#ifdef TRANSPARENT_WATER vec4 fb = texture2D(screenTex, distort2); float depth = texture2D(screenDepth, distort2).r; vec3 refPos = getPositionWithNDC(vec3(distort2*2.0-vec2(1.0), depth*2.0-1.0)); @@ -188,6 +192,9 @@ void main() } fb = applyWaterFogViewLinear(refPos, fb); +#else + vec4 fb = vec4(waterFogColorLinear.rgb, 0.0); +#endif vec3 sunlit; vec3 amblit; diff --git a/indra/newview/app_settings/ultra_graphics.xml b/indra/newview/app_settings/ultra_graphics.xml deleted file mode 100644 index 8462df207b..0000000000 --- a/indra/newview/app_settings/ultra_graphics.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- cgit v1.2.3