From 37eee397b70e2a13a1309025207d1c301f7070c5 Mon Sep 17 00:00:00 2001 From: RunitaiLinden Date: Tue, 18 Apr 2023 19:11:38 -0500 Subject: DRTVWR-559 Add control for automatic reflection probes to advanced preferences and featuretable. Remove Reflections checkbox. Don't persist reflection probe volume display between sessions. Incidental decruft. --- .../shaders/class3/deferred/reflectionProbeF.glsl | 4 ++++ .../shaders/class3/deferred/softenLightF.glsl | 15 --------------- 2 files changed, 4 insertions(+), 15 deletions(-) (limited to 'indra/newview/app_settings/shaders/class3') diff --git a/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl b/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl index 55a43f76d0..36b5262104 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl @@ -122,6 +122,7 @@ bool shouldSampleProbe(int i, vec3 pos) // populate "probeIndex" with N probe indices that influence pos where N is REF_SAMPLE_COUNT void preProbeSample(vec3 pos) { +#if REFMAP_LEVEL > 0 // TODO: make some sort of structure that reduces the number of distance checks for (int i = 1; i < refmapCount; ++i) { @@ -213,6 +214,9 @@ void preProbeSample(vec3 pos) { // probe at index 0 is a special probe for smoothing out automatic probes probeIndex[probeInfluences++] = 0; } +#else + probeIndex[probeInfluences++] = 0; +#endif } // from https://www.scratchapixel.com/lessons/3d-basic-rendering/minimal-ray-tracer-rendering-simple-shapes/ray-sphere-intersection diff --git a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl index ab83708c7b..a8d61afeca 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl @@ -246,20 +246,6 @@ void main() vec3 refnormpersp = reflect(pos.xyz, norm.xyz); -#if 0 // wrong implementation - if (spec.a > 0.0) // specular reflection - { - float sa = dot(normalize(refnormpersp), light_dir.xyz); - vec3 dumbshiny = sunlit * scol * (texture2D(lightFunc, vec2(sa, spec.a)).r); - - // add the two types of shiny together - vec3 spec_contrib = dumbshiny * spec.rgb; - color.rgb += spec_contrib; - - // add radiance map - applyGlossEnv(color, glossenv, spec, pos.xyz, norm.xyz); - } -#else //right implementation (ported from pointLightF.glsl) if (spec.a > 0.0) { vec3 lv = light_dir.xyz; @@ -284,7 +270,6 @@ void main() // add radiance map applyGlossEnv(color, glossenv, spec, pos.xyz, norm.xyz); } -#endif color.rgb = mix(color.rgb, baseColor.rgb, baseColor.a); -- cgit v1.2.3