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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-08-31 03:49:38 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-08-31 03:49:38 +0400
commit29f6616d609fbd92cf313b0fdec555c2fcb4ede0 (patch)
treee0c9500368c5210071cb841ea86f5674b0cf6f25 /intern/cycles/kernel/kernel.cpp
parent60ff60dcdc9f43891fb8a19e10f9bb7964a539bf (diff)
Cycles: viewport render now takes scene color management settings into account,
except for curves, that's still missing from the OpenColorIO GLSL shader. The pixels are stored in a half float texture, converterd from full float with native GPU instructions and SIMD on the CPU, so it should be pretty quick. Using a GLSL shader is useful for GPU render because it avoids a copy through CPU memory.
Diffstat (limited to 'intern/cycles/kernel/kernel.cpp')
-rw-r--r--intern/cycles/kernel/kernel.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/intern/cycles/kernel/kernel.cpp b/intern/cycles/kernel/kernel.cpp
index 3f357763a8f..3e2727fde9a 100644
--- a/intern/cycles/kernel/kernel.cpp
+++ b/intern/cycles/kernel/kernel.cpp
@@ -96,11 +96,16 @@ void kernel_cpu_path_trace(KernelGlobals *kg, float *buffer, unsigned int *rng_s
kernel_path_trace(kg, buffer, rng_state, sample, x, y, offset, stride);
}
-/* Tonemapping */
+/* Film */
-void kernel_cpu_tonemap(KernelGlobals *kg, uchar4 *rgba, float *buffer, int sample, int x, int y, int offset, int stride)
+void kernel_cpu_convert_to_byte(KernelGlobals *kg, uchar4 *rgba, float *buffer, float sample_scale, int x, int y, int offset, int stride)
{
- kernel_film_tonemap(kg, rgba, buffer, sample, x, y, offset, stride);
+ kernel_film_convert_to_byte(kg, rgba, buffer, sample_scale, x, y, offset, stride);
+}
+
+void kernel_cpu_convert_to_half_float(KernelGlobals *kg, uchar4 *rgba, float *buffer, float sample_scale, int x, int y, int offset, int stride)
+{
+ kernel_film_convert_to_half_float(kg, rgba, buffer, sample_scale, x, y, offset, stride);
}
/* Shader Evaluation */