diff options
| author | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2023-07-17 15:06:23 -0700 | 
|---|---|---|
| committer | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2023-07-17 15:06:23 -0700 | 
| commit | 040050af19ff7b5b2f5dc5ce5c4b68cfbb7e492a (patch) | |
| tree | fcde4fb3af978615315f83204e6d7351f3b5f02c /indra/newview/app_settings/shaders/class3/deferred | |
| parent | f7f9601567ce089f3335407f1d3c7d32dbb18c60 (diff) | |
| parent | f975cfd7361729195f2bb14d874e5eacc6140759 (diff) | |
Merge branch 'DRTVWR-559' into DRTVWR-583
Diffstat (limited to 'indra/newview/app_settings/shaders/class3/deferred')
| -rw-r--r-- | indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl | 12 | 
1 files changed, 9 insertions, 3 deletions
| diff --git a/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl b/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl index 298ddf92a7..adbf7abdd1 100644 --- a/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl +++ b/indra/newview/app_settings/shaders/class3/deferred/reflectionProbeF.glsl @@ -368,7 +368,8 @@ return texCUBE(envMap, ReflDirectionWS);  // dir - ray direction in clip space  // i - probe index in refBox/refSphere  // d - distance to nearest wall in clip space -vec3 boxIntersect(vec3 origin, vec3 dir, int i, out float d) +// scale - scale of box, default 1.0 +vec3 boxIntersect(vec3 origin, vec3 dir, int i, out float d, float scale)  {      // Intersection with OBB convert to unit box space      // Transform in local unit parallax cube space (scaled and rotated) @@ -379,7 +380,7 @@ vec3 boxIntersect(vec3 origin, vec3 dir, int i, out float d)      d = 1.0-max(max(abs(PositionLS.x), abs(PositionLS.y)), abs(PositionLS.z)); -    vec3 Unitary = vec3(1.0f, 1.0f, 1.0f); +    vec3 Unitary = vec3(scale);      vec3 FirstPlaneIntersect  = (Unitary - PositionLS) / RayLS;      vec3 SecondPlaneIntersect = (-Unitary - PositionLS) / RayLS;      vec3 FurthestPlane = max(FirstPlaneIntersect, SecondPlaneIntersect); @@ -391,6 +392,11 @@ vec3 boxIntersect(vec3 origin, vec3 dir, int i, out float d)      return IntersectPositionCS;  } +vec3 boxIntersect(vec3 origin, vec3 dir, int i, out float d) +{ +    return boxIntersect(origin, dir, i, d, 1.0); +} +  void debugBoxCol(vec3 ro, vec3 rd, float t, vec3 p, inout vec4 col)  {      vec3 v = ro + rd * t; @@ -539,7 +545,7 @@ vec3 tapIrradianceMap(vec3 pos, vec3 dir, out float w, out float dw, vec3 c, int      if (refIndex[i].w < 0)      {          float d = 0.0; -        v = boxIntersect(pos, dir, i, d); +        v = boxIntersect(pos, dir, i, d, 3.0);          w = max(d, 0.001);      }      else | 
