diff options
author | Dave Parks <davep@lindenlab.com> | 2022-05-17 14:32:07 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2022-05-17 14:32:07 -0500 |
commit | 53c692c9597551c9a1ba8eee346432de51d9d22d (patch) | |
tree | 556441b5d177bb2489e3794e753b4787e4f357e7 /indra/newview/app_settings | |
parent | b2141e94465998d13ab4b5d894b0edcdad0e8216 (diff) |
SL-17416 Quick 'n dirty reflection probe override hack.
Diffstat (limited to 'indra/newview/app_settings')
-rw-r--r-- | indra/newview/app_settings/settings.xml | 14 | ||||
-rw-r--r-- | indra/newview/app_settings/shaders/class2/deferred/softenLightF.glsl | 4 |
2 files changed, 16 insertions, 2 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml index 9f39ea9c8c..aa2f1e9192 100644 --- a/indra/newview/app_settings/settings.xml +++ b/indra/newview/app_settings/settings.xml @@ -10280,7 +10280,19 @@ <key>Value</key> <real>64</real> </map> - <key>RenderReflectionRes</key> + <key>RenderReflectionProbeTextureHackID</key> + <map> + <key>Comment</key> + <string>HACK -- Any object with a diffuse texture with this ID will be treated as a user override reflection probe. (default is "Violet Info Hub" photo from Library)</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>6b186931-05da-eafa-a3ed-a012a33bbfb6</string> + </map> + + <key>RenderReflectionRes</key> <map> <key>Comment</key> <string>Reflection map resolution.</string> 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; |