mirror of
https://github.com/glest/glest-source.git
synced 2025-09-26 15:39:21 +02:00
Added more debugging and option to disable new streflop usage.
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user