Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[MANTA] r1058 - trunk/Model/Materials


Chronological Thread 
  • From: sparker@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [MANTA] r1058 - trunk/Model/Materials
  • Date: Thu, 11 May 2006 10:31:59 -0600 (MDT)

Author: sparker
Date: Thu May 11 10:31:58 2006
New Revision: 1058

Modified:
   trunk/Model/Materials/Phong.cc
Log:
No need to normalize directions twice


Modified: trunk/Model/Materials/Phong.cc
==============================================================================
--- trunk/Model/Materials/Phong.cc      (original)
+++ trunk/Model/Materials/Phong.cc      Thu May 11 10:31:58 2006
@@ -87,6 +87,7 @@
   // Shade a bunch of rays.  We know that they all have the same intersected
   // object and are all of the same material
   
+  // We need normalized directions for proper dot product computation.
   rays.normalizeDirections();
 
   // Compute colors
@@ -107,9 +108,6 @@
   for(int i = rays.begin(); i < rays.end(); i++)
     for(int j=0;j<Color::NumComponents;j++)
       specularLight[j][i] = 0;
-
-  // We need normalized directions for proper dot product computation.
-  rays.normalizeDirections();
 
   ShadowAlgorithm::StateBuffer stateBuffer;
   bool firstTime = true;




  • [MANTA] r1058 - trunk/Model/Materials, sparker, 05/11/2006

Archive powered by MHonArc 2.6.16.

Top of page