From 9ee79bb4faf86596a7affd97005be89d9602eca2 Mon Sep 17 00:00:00 2001 From: Azaezel Date: Tue, 5 Mar 2019 00:41:00 -0600 Subject: [PATCH] reflection scalefix --- .../common/lighting/advanced/reflectionProbeArrayP.hlsl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Templates/Full/game/shaders/common/lighting/advanced/reflectionProbeArrayP.hlsl b/Templates/Full/game/shaders/common/lighting/advanced/reflectionProbeArrayP.hlsl index 2d34d79e0..a4834363d 100644 --- a/Templates/Full/game/shaders/common/lighting/advanced/reflectionProbeArrayP.hlsl +++ b/Templates/Full/game/shaders/common/lighting/advanced/reflectionProbeArrayP.hlsl @@ -88,8 +88,8 @@ float3 boxProject(Surface surface, ProbeData probe) float3 PositionLS = mul( probe.worldToLocal, float4(surface.P,1.0)).xyz; float3 unit = probe.boxMax-probe.boxMin; - float3 plane1vec = (unit - PositionLS) / RayLS; - float3 plane2vec = (-unit - PositionLS) / RayLS; + float3 plane1vec = (unit/2 - PositionLS) / RayLS; + float3 plane2vec = (-unit/2 - PositionLS) / RayLS; float3 furthestPlane = max(plane1vec, plane2vec); float dist = min(min(furthestPlane.x, furthestPlane.y), furthestPlane.z); float3 posonbox = surface.P + surface.R * dist;