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_light.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_light.h')
-rw-r--r--intern/cycles/kernel/kernel_light.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/kernel/kernel_light.h b/intern/cycles/kernel/kernel_light.h
index 68d08a2655f..d5d47b28d59 100644
--- a/intern/cycles/kernel/kernel_light.h
+++ b/intern/cycles/kernel/kernel_light.h
@@ -75,8 +75,8 @@ __device void regular_light_sample(KernelGlobals *kg, int point,
D = distant_light_sample(D, size, randu, randv);
ls->P = D;
- ls->Ng = -D;
- ls->D = D;
+ ls->Ng = D;
+ ls->D = -D;
ls->t = FLT_MAX;
}
else {
@@ -120,9 +120,9 @@ __device float regular_light_pdf(KernelGlobals *kg,
if(t == FLT_MAX)
return pdf;
- float cos_pi = fabsf(dot(Ng, I));
+ float cos_pi = dot(Ng, I);
- if(cos_pi == 0.0f)
+ if(cos_pi <= 0.0f)
return 0.0f;
return t*t*pdf/cos_pi;