Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[MANTA] r1575 - in trunk: Core/Math Engine/ImageTraversers Engine/Shadows


Chronological Thread 
  • From: boulos@sci.utah.edu
  • To: manta@sci.utah.edu
  • Subject: [MANTA] r1575 - in trunk: Core/Math Engine/ImageTraversers Engine/Shadows
  • Date: Sun, 29 Jul 2007 00:06:28 -0600 (MDT)

Author: boulos
Date: Sun Jul 29 00:06:26 2007
New Revision: 1575

Modified:
   trunk/Core/Math/KorobovRNG.h
   trunk/Engine/ImageTraversers/DeadlineImageTraverser.cc
   trunk/Engine/Shadows/NoShadows.cc
Log:
Core/Math/KorobovRNG.h

  Fixing some signed vs unsigned warnings.

Engine/ImageTraversers/DeadlineImageTraverser.cc

  Commenting out unused calculations to kill warnings.

Engine/Shadows/NoShadows.cc

  Fixing an unused variable warning (turns out it should have been
  used, so it's a useful bugfix as well)


Modified: trunk/Core/Math/KorobovRNG.h
==============================================================================
--- trunk/Core/Math/KorobovRNG.h        (original)
+++ trunk/Core/Math/KorobovRNG.h        Sun Jul 29 00:06:26 2007
@@ -55,7 +55,7 @@
     unsigned int a;
     unsigned int num_spp;
     double inv_spp;
-    static const int MAX_SAMPLE_DEPTH = 64;
+    static const unsigned int MAX_SAMPLE_DEPTH = 64;
 
     unsigned int g_table[MAX_SAMPLE_DEPTH];
 
@@ -67,7 +67,7 @@
       // Compute g_table
       a %= num_spp;
       g_table[0] = a;
-      for (int i = 1; i < MAX_SAMPLE_DEPTH; i++) {
+      for (unsigned int i = 1; i < MAX_SAMPLE_DEPTH; i++) {
         g_table[i] = (a * g_table[i-1]) % num_spp;
       }
       // Compute 1/spp

Modified: trunk/Engine/ImageTraversers/DeadlineImageTraverser.cc
==============================================================================
--- trunk/Engine/ImageTraversers/DeadlineImageTraverser.cc      (original)
+++ trunk/Engine/ImageTraversers/DeadlineImageTraverser.cc      Sun Jul 29 
00:06:26 2007
@@ -271,17 +271,19 @@
 
 void DeadlineImageTraverser::renderImage(const RenderContext& context, 
Image* image)
 {
-  double bt = CPUTime::currentSeconds();
   // Determine number of coarse level
   bool stereo;
   int xres, yres;
   image->getResolution(stereo, xres, yres);
   int numEyes = stereo?2:1;
 
-  int coarse_xres = (xres + xcoarsepixelsize - 1) / xcoarsepixelsize;
+  // NOTE(boulos): Only the coarse_yres and ytiles variables are being
+  // used to determine the xtile and ytile of the assignment.
+
+  //int coarse_xres = (xres + xcoarsepixelsize - 1) / xcoarsepixelsize;
   int coarse_yres = (yres + ycoarsepixelsize - 1) / ycoarsepixelsize;
 
-  int xtiles = (coarse_xres + xpacketsize-1)/xpacketsize;
+  //int xtiles = (coarse_xres+ xpacketsize-1)/xpacketsize;
   int ytiles = (coarse_yres + ypacketsize-1)/ypacketsize;
   int xcoarsetilesize = xpacketsize * xcoarsepixelsize;
   int ycoarsetilesize = ypacketsize * ycoarsepixelsize;

Modified: trunk/Engine/Shadows/NoShadows.cc
==============================================================================
--- trunk/Engine/Shadows/NoShadows.cc   (original)
+++ trunk/Engine/Shadows/NoShadows.cc   Sun Jul 29 00:06:26 2007
@@ -27,7 +27,7 @@
                                const LightSet* lights, RayPacket& 
sourceRays, RayPacket& shadowRays)
 {
   int nlights = lights->numLights();
-  
+
   // Compute the hit positions.
   sourceRays.computeHitPositions();
   sourceRays.computeFFNormals( context );
@@ -51,10 +51,14 @@
       // Check to see if the light is on the front face.
       Vector dir = shadowRays.getDirection(i);
       if(Dot(dir, sourceRays.getFFNormal(i)) > 0) {
-        
-        // If so normalize and compute length.
+
+        // If so normalize and compute length (to reset minT).
+        // NOTE(boulos): Although we're not going to determine
+        // occlusion, it is still probably useful to allow the caller
+        // to know how far away the light would be.
         Real length = dir.normalize();
-       
+
+        shadowRays.scaleMinT(i, length);
         // Populate the direction and color only
         shadowRays.setDirection(i, dir );
         shadowRays.resetHit(i);





Archive powered by MHonArc 2.6.16.

Top of page