Added more debugging and option to disable new streflop usage.

This commit is contained in:
Mark Vejvoda
2010-05-01 20:14:25 +00:00
parent 2417f37e21
commit 04bb6659ce
28 changed files with 447 additions and 112 deletions

View File

@@ -9,7 +9,7 @@
// License, or (at your option) any later version
// ==============================================================
#include "streflop_cond.h"
#include "math_wrapper.h"
#include "pixmap.h"
#include <stdexcept>
@@ -655,12 +655,19 @@ void Pixmap2D::splat(const Pixmap2D *leftUp, const Pixmap2D *rightUp, const Pixm
float distRd= splatDist(Vec2i(i, j), Vec2i(w, h));
const float powFactor= 2.0f;
#ifdef USE_STREFLOP
distLu= streflop::pow(distLu, powFactor);
distRu= streflop::pow(distRu, powFactor);
distLd= streflop::pow(distLd, powFactor);
distRd= streflop::pow(distRd, powFactor);
avg= streflop::pow(avg, powFactor);
#else
distLu= pow(distLu, powFactor);
distRu= pow(distRu, powFactor);
distLd= pow(distLd, powFactor);
distRd= pow(distRd, powFactor);
avg= pow(avg, powFactor);
#endif
float lu= distLu>avg? 0: ((avg-distLu))*random.randRange(0.5f, 1.0f);
float ru= distRu>avg? 0: ((avg-distRu))*random.randRange(0.5f, 1.0f);
float ld= distLd>avg? 0: ((avg-distLd))*random.randRange(0.5f, 1.0f);