Skip to content

Commit 8f262ee

Browse files
Merge pull request #112 from PrometheusPi/enable_a0Bug
enable AO bug via pre-compiler flag
2 parents a891944 + 2d864eb commit 8f262ee

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lib/ISAACConfig.cmake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
# ISAAC_CUDA
1313
# ISAAC_ALPAKA
1414
# ISAAC_JPEG
15+
# ISAAC_AO_BUG_FIX
1516

1617
###############################################################################
1718
# ISAAC
@@ -56,6 +57,8 @@ if ( (NOT ISAAC_CUDA) AND (NOT ISAAC_ALPAKA) )
5657
message( FATAL_ERROR "At least Alpaka or Cuda have to be activated!" )
5758
endif()
5859

60+
option(ISAAC_AO_BUG_FIX "fix ambient occlusion bug" ON)
61+
5962
###############################################################################
6063
# JPEGLIB
6164
###############################################################################

lib/isaac/isaac_kernel.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -757,7 +757,9 @@ namespace isaac
757757
normal = start + t0 * dir - particle_pos;
758758
if( t0 < 0 && is_clipped )
759759
{
760-
color.w = 0;
760+
#if ISAAC_AO_BUG_FIX == 1
761+
color.w = 0;
762+
#endif
761763
normal = -clipping_normal;
762764
}
763765
}

0 commit comments

Comments
 (0)