diff options
author | Hristo Gueorguiev <prem.nirved@gmail.com> | 2017-03-08 17:42:26 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-03-09 19:09:37 +0300 |
commit | 57e26627c485baab63e108821b2712d5e234ae7c (patch) | |
tree | e3ee5aa4bf759121559c69504b77d600552bf527 /intern/cycles/kernel/kernels/opencl | |
parent | 6c942db30dee14eb37229879656fa049a9ac6df6 (diff) |
Cycles: SSS and Volume rendering in split kernel
Decoupled ray marching is not supported yet.
Transparent shadows are always enabled for volume rendering.
Changes in kernel/bvh and kernel/geom are from Sergey.
This simiplifies code significantly, and prepares it for
record-all transparent shadow function in split kernel.
Diffstat (limited to 'intern/cycles/kernel/kernels/opencl')
-rw-r--r-- | intern/cycles/kernel/kernels/opencl/kernel_buffer_update.cl (renamed from intern/cycles/kernel/kernels/opencl/kernel_background_buffer_update.cl) | 6 | ||||
-rw-r--r-- | intern/cycles/kernel/kernels/opencl/kernel_do_volume.cl | 26 | ||||
-rw-r--r-- | intern/cycles/kernel/kernels/opencl/kernel_indirect_background.cl | 26 | ||||
-rw-r--r-- | intern/cycles/kernel/kernels/opencl/kernel_indirect_subsurface.cl | 26 | ||||
-rw-r--r-- | intern/cycles/kernel/kernels/opencl/kernel_split.cl | 34 | ||||
-rw-r--r-- | intern/cycles/kernel/kernels/opencl/kernel_subsurface_scatter.cl | 26 |
6 files changed, 141 insertions, 3 deletions
diff --git a/intern/cycles/kernel/kernels/opencl/kernel_background_buffer_update.cl b/intern/cycles/kernel/kernels/opencl/kernel_buffer_update.cl index 47e363f6e03..d3058501f27 100644 --- a/intern/cycles/kernel/kernels/opencl/kernel_background_buffer_update.cl +++ b/intern/cycles/kernel/kernels/opencl/kernel_buffer_update.cl @@ -16,11 +16,11 @@ #include "kernel_compat_opencl.h" #include "split/kernel_split_common.h" -#include "split/kernel_background_buffer_update.h" +#include "split/kernel_buffer_update.h" -__kernel void kernel_ocl_path_trace_background_buffer_update( +__kernel void kernel_ocl_path_trace_buffer_update( KernelGlobals *kg, ccl_constant KernelData *data) { - kernel_background_buffer_update(kg); + kernel_buffer_update(kg); } diff --git a/intern/cycles/kernel/kernels/opencl/kernel_do_volume.cl b/intern/cycles/kernel/kernels/opencl/kernel_do_volume.cl new file mode 100644 index 00000000000..6380e9cb746 --- /dev/null +++ b/intern/cycles/kernel/kernels/opencl/kernel_do_volume.cl @@ -0,0 +1,26 @@ +/* + * Copyright 2011-2017 Blender Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "kernel_compat_opencl.h" +#include "split/kernel_split_common.h" +#include "split/kernel_do_volume.h" + +__kernel void kernel_ocl_path_trace_do_volume( + KernelGlobals *kg, + ccl_constant KernelData *data) +{ + kernel_do_volume(kg); +} diff --git a/intern/cycles/kernel/kernels/opencl/kernel_indirect_background.cl b/intern/cycles/kernel/kernels/opencl/kernel_indirect_background.cl new file mode 100644 index 00000000000..671501bf237 --- /dev/null +++ b/intern/cycles/kernel/kernels/opencl/kernel_indirect_background.cl @@ -0,0 +1,26 @@ +/* + * Copyright 2011-2017 Blender Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "kernel_compat_opencl.h" +#include "split/kernel_split_common.h" +#include "split/kernel_indirect_background.h" + +__kernel void kernel_ocl_path_trace_indirect_background( + KernelGlobals *kg, + ccl_constant KernelData *data) +{ + kernel_indirect_background(kg); +} diff --git a/intern/cycles/kernel/kernels/opencl/kernel_indirect_subsurface.cl b/intern/cycles/kernel/kernels/opencl/kernel_indirect_subsurface.cl new file mode 100644 index 00000000000..b5e52e81ebf --- /dev/null +++ b/intern/cycles/kernel/kernels/opencl/kernel_indirect_subsurface.cl @@ -0,0 +1,26 @@ +/* + * Copyright 2011-2017 Blender Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "kernel_compat_opencl.h" +#include "split/kernel_split_common.h" +#include "split/kernel_indirect_subsurface.h" + +__kernel void kernel_ocl_path_trace_indirect_subsurface( + KernelGlobals *kg, + ccl_constant KernelData *data) +{ + kernel_indirect_subsurface(kg); +} diff --git a/intern/cycles/kernel/kernels/opencl/kernel_split.cl b/intern/cycles/kernel/kernels/opencl/kernel_split.cl new file mode 100644 index 00000000000..7a947c48e60 --- /dev/null +++ b/intern/cycles/kernel/kernels/opencl/kernel_split.cl @@ -0,0 +1,34 @@ +/* + * Copyright 2011-2017 Blender Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "kernel_state_buffer_size.cl" +#include "kernel_data_init.cl" +#include "kernel_path_init.cl" + +#include "kernel_scene_intersect.cl" +#include "kernel_lamp_emission.cl" +#include "kernel_do_volume.cl" +#include "kernel_indirect_background.cl" +#include "kernel_queue_enqueue.cl" +#include "kernel_shader_eval.cl" +#include "kernel_holdout_emission_blurring_pathtermination_ao.cl" +#include "kernel_subsurface_scatter.cl" +#include "kernel_direct_lighting.cl" +#include "kernel_shadow_blocked.cl" +#include "kernel_next_iteration_setup.cl" +#include "kernel_indirect_subsurface.cl" +#include "kernel_buffer_update.cl" + diff --git a/intern/cycles/kernel/kernels/opencl/kernel_subsurface_scatter.cl b/intern/cycles/kernel/kernels/opencl/kernel_subsurface_scatter.cl new file mode 100644 index 00000000000..8dae79bacb0 --- /dev/null +++ b/intern/cycles/kernel/kernels/opencl/kernel_subsurface_scatter.cl @@ -0,0 +1,26 @@ +/* + * Copyright 2011-2017 Blender Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "kernel_compat_opencl.h" +#include "split/kernel_split_common.h" +#include "split/kernel_subsurface_scatter.h" + +__kernel void kernel_ocl_path_trace_subsurface_scatter( + KernelGlobals *kg, + ccl_constant KernelData *data) +{ + kernel_subsurface_scatter(kg); +} |