Text archives Help
- From: thiago@sci.utah.edu
- To: manta@sci.utah.edu
- Subject: [MANTA] r1347 - in trunk: Engine/Control Engine/Shadows Interface Model/Textures
- Date: Mon, 16 Apr 2007 17:07:41 -0600 (MDT)
Author: thiago
Date: Mon Apr 16 17:07:39 2007
New Revision: 1347
Modified:
trunk/Engine/Control/RTRT.cc
trunk/Engine/Shadows/HardShadows.cc
trunk/Interface/RayPacket.h
trunk/Model/Textures/CheckerTexture.cc
Log:
Engine/Shadows/HardShadows.cc :
Fix bug where for loop was going over shadow rays instead of source
rays. This was causing some major and very wierd slowdowns in my
code...
Engine/Control/RTRT.cc :
Initialize some variables so valgrind would quit complaining. I
don't believe this actually changes what is going on.
Model/Textures/CheckerTexture.cc :
Wrapped the entire functions in a #ifdef MANTA_SSE since none of
that function was supposed to be called if SSE was turned off. This
matches the header file as well and allows the code to compile in
non-sse.
Interface/RayPacket.h :
Made rayIsMasked a const function since nothing is changed.
Modified: trunk/Engine/Control/RTRT.cc
==============================================================================
--- trunk/Engine/Control/RTRT.cc (original)
+++ trunk/Engine/Control/RTRT.cc Mon Apr 16 17:07:39 2007
@@ -122,6 +122,8 @@
workersWanted=0;
workersRendering=0;
workersAnimAndImage=0;
+ workersChanged = false;
+ lastChanged = false;
running=false;
animFrameState.frameNumber = 0;
animFrameState.frameTime = 0;
Modified: trunk/Engine/Shadows/HardShadows.cc
==============================================================================
--- trunk/Engine/Shadows/HardShadows.cc (original)
+++ trunk/Engine/Shadows/HardShadows.cc Mon Apr 16 17:07:39 2007
@@ -98,7 +98,7 @@
}
}
} else {
- int i = shadowRays.rayBegin;
+ int i = sourceRays.rayBegin;
for(;i<b;i++){
Vector dir = shadowRays.getDirection(i);
if(Dot(dir, sourceRays.getFFNormal(i)) > 0) {
Modified: trunk/Interface/RayPacket.h
==============================================================================
--- trunk/Interface/RayPacket.h (original)
+++ trunk/Interface/RayPacket.h Mon Apr 16 17:07:39 2007
@@ -433,7 +433,7 @@
#endif
data->minT[which] = -MAXT;
}
- inline bool rayIsMasked(int which) {
+ inline bool rayIsMasked(int which) const {
#ifdef __x86_64
return data->hitMatl[which] == (Material*)0xffffffffffffffff;
#else
Modified: trunk/Model/Textures/CheckerTexture.cc
==============================================================================
--- trunk/Model/Textures/CheckerTexture.cc (original)
+++ trunk/Model/Textures/CheckerTexture.cc Mon Apr 16 17:07:39 2007
@@ -2,6 +2,7 @@
#include <Model/Textures/CheckerTexture.h>
using namespace Manta;
+#ifdef MANTA_SSE
template<>
void CheckerTexture<Color>::mapValues(Packet<Color>& results,
const RenderContext& context,
@@ -11,7 +12,7 @@
rays.computeTextureCoordinates3(context);
else
rays.computeTextureCoordinates2(context);
-#ifdef MANTA_SSE
+
int b = (rays.rayBegin + 3) & (~3);
int e = rays.rayEnd & (~3);
if(b == e){
@@ -79,20 +80,6 @@
results.set(i, values[which]);
}
}
-#else
- for(int i = rays.begin(); i < rays.end(); i++){
- Real vv1 = Dot(rays.getTexCoords(i), v1);
- Real vv2 = Dot(rays.getTexCoords(i), v2);
- if(vv1<0)
- vv1=-vv1+1;
- if(vv2<0)
- vv2=-vv2+1;
- int i1 = (int)vv1;
- int i2 = (int)vv2;
- int which = (i1+i2)&1;
- results.set(i, values[which]);
- }
-#endif
}
template<>
@@ -104,7 +91,6 @@
rays.computeTextureCoordinates3(context);
else
rays.computeTextureCoordinates2(context);
-#ifdef MANTA_SSE
int b = (rays.rayBegin + 3) & (~3);
int e = rays.rayEnd & (~3);
if(b == e){
@@ -166,20 +152,7 @@
results.set(i, values[which]);
}
}
-#else
- for(int i = rays.begin(); i < rays.end(); i++){
- Real vv1 = Dot(rays.getTexCoords(i), v1);
- Real vv2 = Dot(rays.getTexCoords(i), v2);
- if(vv1<0)
- vv1=-vv1+1;
- if(vv2<0)
- vv2=-vv2+1;
- int i1 = (int)vv1;
- int i2 = (int)vv2;
- int which = (i1+i2)&1;
- results.set(i, values[which]);
- }
-#endif
}
+#endif
- [MANTA] r1347 - in trunk: Engine/Control Engine/Shadows Interface Model/Textures, thiago, 04/16/2007
Archive powered by MHonArc 2.6.16.