diff Renderer/Engine/task/DrawSpan.cc @ 621:5b178db5988a

Cell fix
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 15 Nov 2009 03:34:18 +0900
parents 0decff4e867b
children 6a5e88112ed9
line wrap: on
line diff
--- a/Renderer/Engine/task/DrawSpan.cc	Sun Nov 15 02:05:33 2009 +0900
+++ b/Renderer/Engine/task/DrawSpan.cc	Sun Nov 15 03:34:18 2009 +0900
@@ -47,6 +47,12 @@
 // static    void drawLine2(SchedTask *smanager, SpanPtr span, int startx, int endx, int js, int wait_tag);
 static    int infinity_light_calc(int color,float normal_x, float normal_y, float normal_z);
 
+static float
+innerProduct1(float *v0, float *v1)
+{
+    return (v0[0]*v1[0] + v0[1]*v1[1] + v0[2]*v1[2]);
+}
+
 
 /**
  * テクスチャは、TEXTURE_SPLIT_PIXEL^2 のブロックに分割する
@@ -379,7 +385,7 @@
 #endif
 
     // 法線ベクトルと光源ベクトルとの内積をとる
-    inner_product = innerProduct(normal_vector,light_vector);
+    inner_product = innerProduct1(normal_vector,light_vector);
     // 内積がマイナスの場合は色がない。
     flag = (inner_product > 0);