summaryrefslogtreecommitdiff
path: root/indra/newview/app_settings/shaders/class2/deferred
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2022-05-17 14:32:07 -0500
committerDave Parks <davep@lindenlab.com>2022-05-17 14:32:07 -0500
commit53c692c9597551c9a1ba8eee346432de51d9d22d (patch)
tree556441b5d177bb2489e3794e753b4787e4f357e7 /indra/newview/app_settings/shaders/class2/deferred
parentb2141e94465998d13ab4b5d894b0edcdad0e8216 (diff)
SL-17416 Quick 'n dirty reflection probe override hack.
Diffstat (limited to 'indra/newview/app_settings/shaders/class2/deferred')
-rw-r--r--indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl4
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
index 3a1287e910..3607c325a4 100644
--- a/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
+++ b/indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl
@@ -55,6 +55,7 @@ layout (std140, binding = 1) uniform ReflectionProbes
// refIndex.x - cubemap channel in reflectionProbes
// refIndex.y - index in refNeighbor of neighbor list (index is ivec4 index, not int index)
// refIndex.z - number of neighbors
+ // refIndex.w - priority
ivec4 refIndex[REFMAP_COUNT];
// neighbor list data (refSphere indices, not cubemap array layer)
@@ -296,6 +297,7 @@ vec3 sampleRefMap(vec3 pos, vec3 dir, float lod)
{
int i = probeIndex[idx];
float r = refSphere[i].w; // radius of sphere volume
+ float p = float(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;
@@ -310,7 +312,7 @@ vec3 sampleRefMap(vec3 pos, vec3 dir, float lod)
float atten = 1.0-max(d2-r2, 0.0)/(rr-r2);
w *= atten;
-
+ w *= p; // boost weight based on priority
col += refcol*w;
wsum += w;