Skip to content

Commit acc72a4

Browse files
committed
Added a small offset to the boundary check in the Maximum Intensity Project shader code.
1 parent c428695 commit acc72a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Assets/Shaders/DirectVolumeRenderingShader.shader

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@
207207
const float t = iStep * stepSize;
208208
const float3 currPos = rayStartPos + rayDir * t;
209209
// Stop when we are outside the box
210-
if (currPos.x < 0.0f || currPos.x >= 1.0f || currPos.y < 0.0f || currPos.y > 1.0f || currPos.z < 0.0f || currPos.z > 1.0f) // TODO: avoid branch?
210+
if (currPos.x < -0.0001f || currPos.x >= 1.0001f || currPos.y < -0.0001f || currPos.y > 1.0001f || currPos.z < -0.0001f || currPos.z > 1.0001f) // TODO: avoid branch?
211211
break;
212212

213213
#ifdef SLICEPLANE_ON

0 commit comments

Comments
 (0)