mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-14 04:03:46 +00:00
reflection scalefix
This commit is contained in:
parent
7eb6f767d0
commit
9ee79bb4fa
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue