Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2016-01-15 18:00:56 +0300
committerDalai Felinto <dfelinto@gmail.com>2016-01-15 18:00:56 +0300
commit9a76354585e2cd2011267e79bd99ca59a06588f8 (patch)
treee775e7c44dc210ef9978b483930ade6a9b4d6fc5 /intern/cycles/kernel/kernels
parent9137a4401440d3f3206e989f49f3539079d685b8 (diff)
Cycles-Bake: Custom Baking passes
The combined pass is built with the contributions the user finds fit. It is useful for lightmap baking, as well as non-view dependent effects baking. The manual will be updated once we get closer to the 2.77 release. Meanwhile the new page can be found here: http://dalaifelinto.com/blender-manual/render/cycles/baking.html Reviewers: sergey, brecht Differential Revision: https://developer.blender.org/D1674
Diffstat (limited to 'intern/cycles/kernel/kernels')
-rw-r--r--intern/cycles/kernel/kernels/cpu/kernel_cpu.h1
-rw-r--r--intern/cycles/kernel/kernels/cpu/kernel_cpu_impl.h2
-rw-r--r--intern/cycles/kernel/kernels/cuda/kernel.cu4
-rw-r--r--intern/cycles/kernel/kernels/opencl/kernel.cl6
4 files changed, 8 insertions, 5 deletions
diff --git a/intern/cycles/kernel/kernels/cpu/kernel_cpu.h b/intern/cycles/kernel/kernels/cpu/kernel_cpu.h
index 1ce1e41272b..1a07c705f1c 100644
--- a/intern/cycles/kernel/kernels/cpu/kernel_cpu.h
+++ b/intern/cycles/kernel/kernels/cpu/kernel_cpu.h
@@ -44,6 +44,7 @@ void KERNEL_FUNCTION_FULL_NAME(shader)(KernelGlobals *kg,
float4 *output,
float *output_luma,
int type,
+ int filter,
int i,
int offset,
int sample);
diff --git a/intern/cycles/kernel/kernels/cpu/kernel_cpu_impl.h b/intern/cycles/kernel/kernels/cpu/kernel_cpu_impl.h
index 0249610b381..1454f925ab9 100644
--- a/intern/cycles/kernel/kernels/cpu/kernel_cpu_impl.h
+++ b/intern/cycles/kernel/kernels/cpu/kernel_cpu_impl.h
@@ -101,6 +101,7 @@ void KERNEL_FUNCTION_FULL_NAME(shader)(KernelGlobals *kg,
float4 *output,
float *output_luma,
int type,
+ int filter,
int i,
int offset,
int sample)
@@ -111,6 +112,7 @@ void KERNEL_FUNCTION_FULL_NAME(shader)(KernelGlobals *kg,
input,
output,
(ShaderEvalType)type,
+ filter,
i,
offset,
sample);
diff --git a/intern/cycles/kernel/kernels/cuda/kernel.cu b/intern/cycles/kernel/kernels/cuda/kernel.cu
index e094612de01..c8940b981bb 100644
--- a/intern/cycles/kernel/kernels/cuda/kernel.cu
+++ b/intern/cycles/kernel/kernels/cuda/kernel.cu
@@ -183,12 +183,12 @@ kernel_cuda_shader(uint4 *input,
extern "C" __global__ void
CUDA_LAUNCH_BOUNDS(CUDA_THREADS_BLOCK_WIDTH, CUDA_KERNEL_MAX_REGISTERS)
-kernel_cuda_bake(uint4 *input, float4 *output, int type, int sx, int sw, int offset, int sample)
+kernel_cuda_bake(uint4 *input, float4 *output, int type, int filter, int sx, int sw, int offset, int sample)
{
int x = sx + blockDim.x*blockIdx.x + threadIdx.x;
if(x < sx + sw)
- kernel_bake_evaluate(NULL, input, output, (ShaderEvalType)type, x, offset, sample);
+ kernel_bake_evaluate(NULL, input, output, (ShaderEvalType)type, filter, x, offset, sample);
}
#endif
diff --git a/intern/cycles/kernel/kernels/opencl/kernel.cl b/intern/cycles/kernel/kernels/opencl/kernel.cl
index 4c9f7ba1d7c..0a44a4d0301 100644
--- a/intern/cycles/kernel/kernels/opencl/kernel.cl
+++ b/intern/cycles/kernel/kernels/opencl/kernel.cl
@@ -99,7 +99,7 @@ __kernel void kernel_ocl_bake(
ccl_global type *name,
#include "../../kernel_textures.h"
- int type, int sx, int sw, int offset, int sample)
+ int type, int filter, int sx, int sw, int offset, int sample)
{
KernelGlobals kglobals, *kg = &kglobals;
@@ -115,7 +115,7 @@ __kernel void kernel_ocl_bake(
#ifdef __NO_BAKING__
output[x] = make_float4(0.0f, 0.0f, 0.0f, 0.0f);
#else
- kernel_bake_evaluate(kg, input, output, (ShaderEvalType)type, x, offset, sample);
+ kernel_bake_evaluate(kg, input, output, (ShaderEvalType)type, filter, x, offset, sample);
#endif
}
}
@@ -174,4 +174,4 @@ __kernel void kernel_ocl_convert_to_half_float(
kernel_film_convert_to_half_float(kg, rgba, buffer, sample_scale, x, y, offset, stride);
}
-#endif // __COMPILE_ONLY_MEGAKERNEL__ \ No newline at end of file
+#endif // __COMPILE_ONLY_MEGAKERNEL__