Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[MANTA] r945 - trunk/fox/disco_demo/Engine/Shaders


Chronological Thread 
  • From: bigler@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [MANTA] r945 - trunk/fox/disco_demo/Engine/Shaders
  • Date: Sat, 18 Feb 2006 14:42:37 -0700 (MST)

Author: bigler
Date: Sat Feb 18 14:42:37 2006
New Revision: 945

Modified:
   trunk/fox/disco_demo/Engine/Shaders/AOShader.cc
Log:

Need to check with vectors that are both (1,0,0) and (-1,0,0) when
computing ortho-normal bases.


Modified: trunk/fox/disco_demo/Engine/Shaders/AOShader.cc
==============================================================================
--- trunk/fox/disco_demo/Engine/Shaders/AOShader.cc     (original)
+++ trunk/fox/disco_demo/Engine/Shaders/AOShader.cc     Sat Feb 18 14:42:37 
2006
@@ -126,7 +126,7 @@
     // Determine if W can be crossed with 1,0,0.  Normally we would do
     // this by checking the dot product of W and [1,0,0], but since
     // this is simpley W[0]*1 or W[0] we can simplify the expression.
-    U = ((1-W[0]) < (Real)1e-6) ?
+    U = ((1-Abs(W[0])) < (Real)1e-6) ?
       Cross( W, Vector(0,1,0) ) :
       Cross( W, Vector(1,0,0) );
     V = Cross( W, U );




  • [MANTA] r945 - trunk/fox/disco_demo/Engine/Shaders, bigler, 02/18/2006

Archive powered by MHonArc 2.6.16.

Top of page