From: Rudolf Polzer Date: Thu, 26 Aug 2010 04:09:40 +0000 (+0200) Subject: explain more X-Git-Tag: xonotic-v0.1.0preview~264 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=56cf102d6417ee780f45af1fb8d4628a0132f5ec;p=xonotic%2Fxonotic.git explain more --- diff --git a/misc/tools/fft-normalmap-to-heightmap.c b/misc/tools/fft-normalmap-to-heightmap.c index 909f591f..aa4ac7ff 100644 --- a/misc/tools/fft-normalmap-to-heightmap.c +++ b/misc/tools/fft-normalmap-to-heightmap.c @@ -39,7 +39,7 @@ void nmap_to_hmap(unsigned char *map, const unsigned char *refmap, int w, int h, { int x, y; int fx, fy; - int ffx, ffy; + double ffx, ffy; double nx, ny, nz; double v, vmin, vmax; #ifndef C99 @@ -95,6 +95,7 @@ void nmap_to_hmap(unsigned char *map, const unsigned char *refmap, int w, int h, if(fy > h/2) fy -= h; /* these must have the same sign as fx and fy (so ffx*fx + ffy*fy is nonzero), otherwise do not matter */ + /* it basically decides how artifacts are distributed */ ffx = fx; ffy = fy; #ifdef C99