فهرست منبع

we do actually need to account for reference position (of the capture box) to avoid it trying to look up the cube face relative to world origin... will need to eyeball what's going on backend wise forcing additional position-offsetting...

AzaezelX 5 سال پیش
والد
کامیت
d15780b0cb
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      Templates/BaseGame/game/core/rendering/shaders/lighting.hlsl

+ 1 - 1
Templates/BaseGame/game/core/rendering/shaders/lighting.hlsl

@@ -377,7 +377,7 @@ float3 boxProject(float3 wsPosition, float3 wsReflectVec, float4x4 worldToObj, f
    float dist = min(min(furthestPlane.x, furthestPlane.y), furthestPlane.z);
    float3 posonbox = wsPosition + wsReflectVec * dist;
 
-   return posonbox;
+   return posonbox-refPosition;
 }
 
 float4 computeForwardProbes(Surface surface,