Skip to content

Commit 7cd35e1

Browse files
committed
Temporary fix for SurfaceExtraction issues on windows
1 parent d76eab8 commit 7cd35e1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

source/FAST/Algorithms/SurfaceExtraction/SurfaceExtraction_no_3d_write.cl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -681,10 +681,12 @@ __kernel void traverseHP(
681681
);
682682

683683
const float value0 = READ_RAW_DATA(rawData, sampler, (int4)(point0.x, point0.y, point0.z, 0)).x;
684+
const float value1 = READ_RAW_DATA(rawData, sampler, (int4)(point1.x, point1.y, point1.z, 0)).x;
684685
float diff = native_divide(
685-
isolevel-value0,
686-
READ_RAW_DATA(rawData, sampler, (int4)(point1.x, point1.y, point1.z, 0)).x - value0);
686+
isolevel - value0,
687+
value1 - value0);
687688

689+
diff = clamp(diff, 0.0f, 1.0f); // TODO Should not be needed
688690

689691
// OpenCL on Mac is missing the mix function for some reason
690692
#ifdef MAC_HACK

0 commit comments

Comments
 (0)