summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class3
diff options
context:
space:
mode:
authorRunitaiLinden <davep@lindenlab.com>2023-04-18 19:11:38 -0500
committerRunitaiLinden <davep@lindenlab.com>2023-04-18 19:11:38 -0500
commit37eee397b70e2a13a1309025207d1c301f7070c5 (patch)
tree8f223d6719ce6bb57726e81b514f60c7d7a89359 /indra/newview/app_settings/shaders/class3
parent04b6b84798c497582d8706368580eb3c3ce699eb (diff)
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.
Diffstat (limited to 'indra/newview/app_settings/shaders/class3')
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl4
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/softenLightF.glsl15
2 files changed, 4 insertions, 15 deletions
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);