summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class3
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-06-10 01:13:41 -0500
committerDave Parks <davep@lindenlab.com>2022-06-10 01:13:41 -0500
commit509476f95ed75ce8289ecd69b4c94d9912e1d3df (patch)
treefe24ef1046fef41e9e9c5ca8a8c9ef8fdc79bfe3 /indra/newview/app_settings/shaders/class3
parent03d85bfb33f53e658256d8bedcf0b4262226cf90 (diff)
SL-17574 Add probe detail combo box to advanced graphics preferences. Fix spot light shadows not working in probes.
Diffstat (limited to 'indra/newview/app_settings/shaders/class3')
-rw-r--r--indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl13
1 files changed, 12 insertions, 1 deletions
diff --git a/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl b/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl
index 3fd001e7f5..b3396baeba 100644
--- a/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl
+++ b/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl
@@ -74,6 +74,8 @@ bool isAbove(vec3 pos, vec4 plane)
return (dot(plane.xyz, pos) + plane.w) > 0;
}
+int max_priority = 0;
+
// return true if probe at index i influences position pos
bool shouldSampleProbe(int i, vec3 pos)
{
@@ -86,6 +88,8 @@ bool shouldSampleProbe(int i, vec3 pos)
{
return false;
}
+
+ max_priority = max(max_priority, -refIndex[i].w);
}
else
{
@@ -98,6 +102,8 @@ bool shouldSampleProbe(int i, vec3 pos)
{ //outside bounding sphere
return false;
}
+
+ max_priority = max(max_priority, refIndex[i].w);
}
return true;
@@ -343,8 +349,13 @@ vec3 sampleProbes(vec3 pos, vec3 dir, float lod, float minweight)
for (int idx = 0; idx < probeInfluences; ++idx)
{
int i = probeIndex[idx];
+ if (refIndex[i].w < max_priority)
+ {
+ continue;
+ }
float r = refSphere[i].w; // radius of sphere volume
float p = float(abs(refIndex[i].w)); // priority
+
float rr = r*r; // radius squred
float r1 = r * 0.1; // 75% of radius (outer sphere to start interpolating down)
vec3 delta = pos.xyz-refSphere[i].xyz;
@@ -358,7 +369,7 @@ vec3 sampleProbes(vec3 pos, vec3 dir, float lod, float minweight)
float atten = 1.0-max(d2-r2, 0.0)/(rr-r2);
w *= atten;
- w *= p; // boost weight based on priority
+ //w *= p; // boost weight based on priority
col += refcol*w*max(minweight, refParams[i].x);
wsum += w;