From 58733012579bef18c0fe26608a24f8c47eecdcd4 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 20 Jan 2012 17:49:17 +0000 Subject: Sample as Lamp option for world shaders, to enable multiple importance sampling. By default lighting from the world is computed solely with indirect light sampling. However for more complex environment maps this can be too noisy, as sampling the BSDF may not easily find the highlights in the environment map image. By enabling this option, the world background will be sampled as a lamp, with lighter parts automatically given more samples. Map Resolution specifies the size of the importance map (res x res). Before rendering starts, an importance map is generated by "baking" a grayscale image from the world shader. This will then be used to determine which parts of the background are light and so should receive more samples than darker parts. Higher resolutions will result in more accurate sampling but take more setup time and memory. Patch by Mike Farnsworth, thanks! --- intern/cycles/kernel/kernel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'intern/cycles/kernel/kernel.cpp') diff --git a/intern/cycles/kernel/kernel.cpp b/intern/cycles/kernel/kernel.cpp index e66ddd86cd6..9e0d252772b 100644 --- a/intern/cycles/kernel/kernel.cpp +++ b/intern/cycles/kernel/kernel.cpp @@ -218,7 +218,7 @@ void kernel_cpu_tonemap(KernelGlobals *kg, uchar4 *rgba, float4 *buffer, int sam /* Shader Evaluation */ -void kernel_cpu_shader(KernelGlobals *kg, uint4 *input, float3 *output, int type, int i) +void kernel_cpu_shader(KernelGlobals *kg, uint4 *input, float4 *output, int type, int i) { kernel_shader_evaluate(kg, input, output, (ShaderEvalType)type, i); } -- cgit v1.2.3