blender/intern/cycles/kernel
Brecht Van Lommel 9ab259f55b Cycles: shadow function optimization for transparent shadows (CPU only).
Old algorithm:

Raytrace from one transparent surface to the next step by step. To minimize
overhead in cases where we don't need transparent shadows, we first trace a
regular shadow ray. We check if the hit primitive was potentially transparent,
and only in that case start marching. this gives extra ray cast for the cases
were we do want transparency.

New algorithm:

We trace a single ray. If it hits any opaque surface, or more than a given
number of transparent surfaces is hit, then we consider the geometry to be
entirely blocked. If not, all transparent surfaces will be recorded and we
will shade them one by one to determine how much light is blocked. This all
happens in one scene intersection function.

Recording all hits works well in some cases but may be slower in others. If
we have many semi-transparent hairs, one intersection may be faster because
you'd be reinteresecting the same hairs a lot with each step otherwise. If
however there is mostly binary transparency then we may be recording many
unnecessary intersections when one of the first surfaces blocks all light.

We found that this helps quite nicely in some scenes, on koro.blend this can
give a 50% reduction in render time, on the pabellon barcelona scene and a
forest scene with transparent leaves it was 30%. Some other files rendered
maybe 1% or 2% slower, but this seems a reasonable tradeoff.

Differential Revision: https://developer.blender.org/D473
2014-04-21 19:34:25 +02:00
..
closure Fix T38615: cycles rendering beckmann/GGX refraction wrong with IOR equal to 1. 2014-02-12 22:50:31 +01:00
geom Cycles: shadow function optimization for transparent shadows (CPU only). 2014-04-21 19:34:25 +02:00
osl Cycles: add Transparent Depth output to Light Path node. 2014-04-21 14:44:36 +02:00
shaders Cycles: add Transparent Depth output to Light Path node. 2014-04-21 14:44:36 +02:00
svm Code cleanup: remove old closure sampling code Cycles. 2014-04-21 16:14:37 +02:00
CMakeLists.txt Cycles code refactor: use __launch_bounds__ instead of -maxrregcount for CUDA. 2014-04-16 21:05:04 +02:00
kernel_accumulate.h Cycles: Code refactor for Clamping/Inf Rejection, combined into 1 function. Also avoid some conditionals. 2014-02-11 17:44:41 +01:00
kernel_avx.cpp Cycles: Add an AVX kernel for CPU rendering. 2014-01-16 17:04:11 +01:00
kernel_camera.h Cycles code refactor: replace magic ~0 values in the code with defines. 2014-03-29 13:03:47 +01:00
kernel_compat_cpu.h Cycles code internals: add CPU kernel support for 3D image textures. 2014-03-29 13:03:48 +01:00
kernel_compat_cuda.h Code cleanup: move half float functions to separate header file. 2014-01-15 15:29:22 +01:00
kernel_compat_opencl.h OpenCL + AMD adapt kernel to newer driver 2014-04-07 14:01:31 +02:00
kernel_differential.h Cycles: change __device and similar qualifiers to ccl_device in kernel code. 2013-11-18 08:48:15 +01:00
kernel_displace.h Cycles: add Transparent Depth output to Light Path node. 2014-04-21 14:44:36 +02:00
kernel_emission.h Cleanup: Pass PathState as a whole, instead of individual members. 2014-04-21 17:52:19 +02:00
kernel_film.h Cycles: fix crash in SSE hair and half-floats on x86+vc2008 2014-02-27 15:01:20 +04:00
kernel_globals.h Fix T37264: cycles CPU render had limited number of float images, bumped to 1024. 2013-12-14 15:07:46 +01:00
kernel_jitter.h Cycles: change __device and similar qualifiers to ccl_device in kernel code. 2013-11-18 08:48:15 +01:00
kernel_light.h Cycles code refactor: replace magic ~0 values in the code with defines. 2014-03-29 13:03:47 +01:00
kernel_math.h Cycles: relicense GNU GPL source code to Apache version 2.0. 2013-08-18 14:16:15 +00:00
kernel_montecarlo.h Cycles code refactor: minor refactoring and comments for volume code. 2014-03-29 13:03:49 +01:00
kernel_passes.h Cycles: add pass alpha threshold value to render layers. 2014-02-06 15:24:15 +01:00
kernel_path_state.h Cycles code refactor: replace magic ~0 values in the code with defines. 2014-03-29 13:03:47 +01:00
kernel_path.h Cleanup: Pass PathState as a whole, instead of individual members. 2014-04-21 17:52:19 +02:00
kernel_projection.h Fix cycles using acosf in panorama render when it should use safe_acosf. 2014-04-18 13:51:29 +02:00
kernel_random.h Fix T38710: volume render issue with transparent surfaces. 2014-02-26 18:47:50 +01:00
kernel_shader.h Code cleanup: remove old closure sampling code Cycles. 2014-04-21 16:14:37 +02:00
kernel_shadow.h Cycles: shadow function optimization for transparent shadows (CPU only). 2014-04-21 19:34:25 +02:00
kernel_sse2.cpp Code cleanup: some reshuffling of SIMD defines moving more code to util_optimization.h. 2014-01-15 15:11:50 +01:00
kernel_sse3.cpp Code cleanup: some reshuffling of SIMD defines moving more code to util_optimization.h. 2014-01-15 15:11:50 +01:00
kernel_sse41.cpp Code cleanup: some reshuffling of SIMD defines moving more code to util_optimization.h. 2014-01-15 15:11:50 +01:00
kernel_subsurface.h Code cleanup: white space and cmake was broken on all platforms 2014-02-03 13:56:34 +11:00
kernel_textures.h Cycles code refactor: changes to make adding new primitive types easier. 2014-03-29 13:03:46 +01:00
kernel_types.h Cycles: shadow function optimization for transparent shadows (CPU only). 2014-04-21 19:34:25 +02:00
kernel_volume.h Cycles: add Transparent Depth output to Light Path node. 2014-04-21 14:44:36 +02:00
kernel.cl Cycles: change __device and similar qualifiers to ccl_device in kernel code. 2013-11-18 08:48:15 +01:00
kernel.cpp Cycles code internals: add CPU kernel support for 3D image textures. 2014-03-29 13:03:48 +01:00
kernel.cu Cycles code refactor: use __launch_bounds__ instead of -maxrregcount for CUDA. 2014-04-16 21:05:04 +02:00
kernel.h Cycles code internals: add CPU kernel support for 3D image textures. 2014-03-29 13:03:48 +01:00
SConscript Fix for scons/CUDA build after recent commit. 2014-04-16 21:23:37 +02:00