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>2011-10-16 03:49:01 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2011-10-16 03:49:01 +0400
commitd5b679253a09c161707437f0a86bf32d5b548a63 (patch)
tree3daf12f3074b1e4ce391ef8950dc4676ba41c79b /intern/cycles/kernel/kernel_emission.h
parentd293d74942a8f48d4de6c53f4300540bd0035c34 (diff)
Cycles:
* Sun, area and point lights with size now supported * Cast shadow option to disable shadow casting for lamps * Emission strength of materials tweaked such that setting strength to 1.0 basically makes the material "shadeless" in that the value of the color input will be the resulting color in the image.
Diffstat (limited to 'intern/cycles/kernel/kernel_emission.h')
-rw-r--r--intern/cycles/kernel/kernel_emission.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/intern/cycles/kernel/kernel_emission.h b/intern/cycles/kernel/kernel_emission.h
index 13c48464088..22970f66669 100644
--- a/intern/cycles/kernel/kernel_emission.h
+++ b/intern/cycles/kernel/kernel_emission.h
@@ -88,14 +88,11 @@ __device bool direct_emission(KernelGlobals *kg, ShaderData *sd, int lindex,
float mis_weight = power_heuristic(pdf, bsdf_pdf);
*eval *= mis_weight;
}
- else if(!(ls.shader & SHADER_AREA_LIGHT)) {
- /* ensure point light works in Watts, this should be handled
- * elsewhere but for now together with the diffuse emission
- * closure it works out to the right value */
- *eval *= 0.25f;
-
- /* XXX verify with other light types */
- }
+ /* todo: clean up these weights */
+ else if(ls.shader & SHADER_AREA_LIGHT)
+ *eval *= 0.25f; /* area lamp */
+ else if(ls.t != FLT_MAX)
+ *eval *= 0.25f*M_1_PI_F; /* point lamp */
if(ls.shader & SHADER_CAST_SHADOW) {
/* setup ray */