Skip to content

Commit 8422d85

Browse files
Merge pull request #109 from FelixTUD/dev-server-fixes
Use correct MIN/MAX functions in kernel
2 parents 68d0690 + bcf0884 commit 8422d85

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/isaac/isaac_kernel.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2275,8 +2275,8 @@ namespace isaac
22752275
for(int i = -3; i <= 3; i++) {
22762276
for(int j = -3; j <= 3; j++) {
22772277
//avoid out of bounds by simple min max
2278-
isaac_int x = MAX(MIN(pixel.x + i * radius, framebuffer_start.x + framebuffer_size.x), framebuffer_start.x);
2279-
isaac_int y = MAX(MIN(pixel.y + j * radius, framebuffer_start.y + framebuffer_size.y), framebuffer_start.y);
2278+
isaac_int x = ISAAC_MAX(ISAAC_MIN(pixel.x + i * radius, framebuffer_start.x + framebuffer_size.x), framebuffer_start.x);
2279+
isaac_int y = ISAAC_MAX(ISAAC_MIN(pixel.y + j * radius, framebuffer_start.y + framebuffer_size.y), framebuffer_start.y);
22802280

22812281
//get the neighbour depth value
22822282
isaac_float depth_sample = gDepth[x + y * framebuffer_size.x].z;

0 commit comments

Comments
 (0)