Revision: 40115
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40115
Author: campbellbarton
Date: 2011-09-11 07:06:21 +0000 (Sun, 11 Sep 2011)
Log Message:
-----------
fix for error in own commit r40108.
Revision Links:
--------------
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=40108
Modified Paths:
--------------
trunk/blender/source/blender/render/intern/source/shadeoutput.c
Modified: trunk/blender/source/blender/render/intern/source/shadeoutput.c
===================================================================
--- trunk/blender/source/blender/render/intern/source/shadeoutput.c
2011-09-11 06:41:09 UTC (rev 40114)
+++ trunk/blender/source/blender/render/intern/source/shadeoutput.c
2011-09-11 07:06:21 UTC (rev 40115)
@@ -1126,7 +1126,7 @@
float visifac= 1.0f, t;
sub_v3_v3v3(lv, co, lar->co);
- *dist= len_v3v3(lv, lv);
+ *dist= sqrtf(dot_v3v3(lv, lv));
t= 1.0f/dist[0];
mul_v3_fl(lv, t);
@@ -1179,7 +1179,7 @@
float inpr;
if(lar->mode & LA_SQUARE) {
-
if(lv[0]*lar->vec[0]+lv[1]*lar->vec[1]+lv[2]*lar->vec[2]>0.0f) {
+ if(dot_v3v3(lv, lar->vec) >
0.0f) {
float lvrot[3], x;
/* rotate view to
lampspace */
@@ -1314,8 +1314,8 @@
/* dot product and reflectivity */
/* inp = dotproduct, is = shader result, i = lamp energy (with shadow),
i_noshad = i without shadow */
- inp= vn[0]*lv[0] + vn[1]*lv[1] + vn[2]*lv[2];
-
+ inp= dot_v3v3(vn, lv);
+
/* phong threshold to prevent backfacing faces having artefacts on ray
shadow (terminator problem) */
/* this complex construction screams for a nicer implementation! (ton)
*/
if(R.r.mode & R_SHADOW) {
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs