]> git.xonotic.org Git - xonotic/xonotic.git/blobdiff - misc/tools/fft-normalmap-to-heightmap.c
explain more
[xonotic/xonotic.git] / misc / tools / fft-normalmap-to-heightmap.c
index 909f591ff33667355fec0f52bebdcb5d77ab219d..aa4ac7fffe78855f555424ba2cfff178581f75db 100644 (file)
@@ -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