blender/intern/cycles/kernel
Lukas Stockner b459d9f46c Cycles: Stop lamp sampling if the lamp isn't visible
Both spot and area light have large areas where they're not visible.
Therefore, this patch stops the light sampling code when one of these cases (outside of the spotlight cone or behind the area light) occurs, before the lamp shader is evaluated.
In the case of the area light, the solid angle sampling can also be skipped.

In a test scene with Sample All Lights and 18 Area lamps and 9 Spot lamps that all point away from the area that the camera sees, render time drops from 12sec to 5sec.

Reviewers: brecht, sergey, dingto, juicyfruit

Differential Revision: https://developer.blender.org/D2216
2016-09-14 19:45:12 +02:00
..
bvh Cycles: Also support the constant emission speedup for mesh lights 2016-09-14 18:53:35 +02:00
closure Cycles: Fix embarrassing typo 2016-08-05 14:45:54 +02:00
geom Cycles: Also support the constant emission speedup for mesh lights 2016-09-14 18:53:35 +02:00
kernels Cycles: Change code order for Image Data Types. 2016-08-11 22:30:03 +02:00
osl Cycles: Silence strict compiler warning in release build 2016-09-02 09:14:34 +02:00
shaders Fix T49327: Cycles OSL Mode: RGB Curves node only outputs gray scale images 2016-09-12 16:14:40 +02:00
split Cycles: Stop lamp sampling if the lamp isn't visible 2016-09-14 19:45:12 +02:00
svm Cycles: Replace object index hack with actual checks for SD_TRANSFORM_APPLIED 2016-09-11 13:49:05 -04:00
CMakeLists.txt Cycles microdisplacement: Improved automatic bump mapping 2016-09-01 22:45:49 -04:00
kernel_accumulate.h Fix Cycles kernel build without render passes support. 2016-07-18 22:40:08 +02:00
kernel_bake.h Cycles: Replace object index hack with actual checks for SD_TRANSFORM_APPLIED 2016-09-11 13:49:05 -04:00
kernel_camera.h Cycles: Replace object index hack with actual checks for SD_TRANSFORM_APPLIED 2016-09-11 13:49:05 -04:00
kernel_compat_cpu.h Fix a few OpenCL compiler warnings. 2016-09-03 23:06:12 +02:00
kernel_compat_cuda.h Fix Cycles OpenCL textures after recent CUDA fix. 2016-08-15 16:28:48 +02:00
kernel_compat_opencl.h Fix Cycles CUDA adaptive kernel not working correctly after recent closure changes. 2016-08-09 01:31:07 +02:00
kernel_debug.h Cycles: Add debug pass which shows number of instance pushes during camera ray intersection 2015-06-12 00:12:03 +02:00
kernel_differential.h Cycles: OpenCL kernel split 2015-05-09 19:52:40 +05:00
kernel_emission.h Cycles: Also support the constant emission speedup for mesh lights 2016-09-14 18:53:35 +02:00
kernel_film.h Cycles: Use native saturate function for CUDA 2015-04-28 00:38:32 +05:00
kernel_globals.h Cycles: Support half and half4 textures. 2016-06-19 17:31:16 +02:00
kernel_jitter.h Fix T48301: Cycles incorrect render with CMJ and viewport samples 0. 2016-04-28 23:57:20 +02:00
kernel_light.h Cycles: Stop lamp sampling if the lamp isn't visible 2016-09-14 19:45:12 +02:00
kernel_math.h Cleanup: Move texture definitions to util, to avoid bad level include. 2016-04-15 23:02:44 +02: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: OpenCL kernel split 2015-05-09 19:52:40 +05:00
kernel_path_branched.h Cycles: Cleanup, indentation 2016-08-25 12:33:07 +02:00
kernel_path_common.h Cycles: OpenCL kernel split 2015-05-09 19:52:40 +05:00
kernel_path_state.h Fix T49078: Cycles tries to render volume from another render layer when camera is in volume 2016-08-25 10:55:59 +02:00
kernel_path_surface.h Cycles: Stop lamp sampling if the lamp isn't visible 2016-09-14 19:45:12 +02:00
kernel_path_volume.h Cycles: Stop lamp sampling if the lamp isn't visible 2016-09-14 19:45:12 +02:00
kernel_path.h Cycles: Recent SSS inline changes broke CPU tests 2016-08-03 15:27:48 +02:00
kernel_projection.h Cycles: Tweaks to support CUDA 8 toolkit 2016-08-01 15:54:29 +02:00
kernel_queues.h Cycles: Code cleanup in split kernel, whitespaces 2015-07-03 11:03:56 +02:00
kernel_random.h Cycles: Fix/workaround for missing AA on Pascal (GTX10x0) cards 2016-08-23 16:32:09 +02:00
kernel_shader.h Cycles: Also support the constant emission speedup for mesh lights 2016-09-14 18:53:35 +02:00
kernel_shadow.h Cycles: Revert previous fixes to intersect_all functions 2016-07-26 17:16:23 +02:00
kernel_subsurface.h Cycles: Fix wrong SSS in combination with hair on AVX2 platform 2016-09-12 12:48:35 +02:00
kernel_textures.h Fix Cycles OpenCL textures after recent CUDA fix. 2016-08-15 16:28:48 +02:00
kernel_types.h Cycles: Also support the constant emission speedup for mesh lights 2016-09-14 18:53:35 +02:00
kernel_volume.h Cycles: Also support the constant emission speedup for mesh lights 2016-09-14 18:53:35 +02:00
kernel_work_stealing.h Cycles: Cleanup, indent nested preprocessor directives 2016-03-25 13:55:42 +01:00
kernel.h Cycles: Deduplicte CPU kernel declaration and definition code 2015-12-30 17:54:02 +05:00