Revision: 39931
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39931
Author:   blendix
Date:     2011-09-05 16:25:42 +0000 (Mon, 05 Sep 2011)
Log Message:
-----------
Fix #28394: clouds texture error with high noise depth and blender original
noise, patch from Campbell, 

Modified Paths:
--------------
    trunk/blender/source/blender/blenlib/intern/noise.c

Modified: trunk/blender/source/blender/blenlib/intern/noise.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/noise.c 2011-09-05 16:16:00 UTC 
(rev 39930)
+++ trunk/blender/source/blender/blenlib/intern/noise.c 2011-09-05 16:25:42 UTC 
(rev 39931)
@@ -263,14 +263,22 @@
 static float orgBlenderNoise(float x, float y, float z)
 {
        register float cn1, cn2, cn3, cn4, cn5, cn6, i, *h;
-       float ox, oy, oz, jx, jy, jz;
+       float fx, fy, fz, ox, oy, oz, jx, jy, jz;
        float n= 0.5;
        int ix, iy, iz, b00, b01, b10, b11, b20, b21;
 
-       ox= (x- (ix= (int)floor(x)) );
-       oy= (y- (iy= (int)floor(y)) );
-       oz= (z- (iz= (int)floor(z)) );
+       fx= floor(x);
+       fy= floor(y);
+       fz= floor(z);
 
+       ox= x- fx;
+       oy= y- fy;
+       oz= z- fz;
+
+       ix= (int)fx;
+       iy= (int)fy;
+       iz= (int)fz;
+
        jx= ox-1;
        jy= oy-1;
        jz= oz-1;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to