/[gzz]/gzz/gfx/libtexture/irregu.texture
ViewVC logotype

Diff of /gzz/gfx/libtexture/irregu.texture

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11 by jvk, Sat Oct 26 14:09:53 2002 UTC revision 1.12 by jvk, Mon Oct 28 09:54:56 2002 UTC
# Line 75  void GENERATE(TextureParam *params, int Line 75  void GENERATE(TextureParam *params, int
75          if (f > 1) f = 1;          if (f > 1) f = 1;
76          if (f < 0) f = 0;          if (f < 0) f = 0;
77    
78            float factor = (1 - radius / (width * ripple_scale));
79            if (factor < 0) factor = 0;
80    
81          if (components != 2) {          if (components != 2) {
82              // Scale down to make space for the border              // Scale down to make space for the border
83              f *= (1 - radius / (width * ripple_scale));              f *= factor;
84              if (f < 0) f = 0;          } else {
85                // Scale towards middle to make space for the border
86                f = (f - .5) * factor + .5;
87          }          }
88    
89          data[i] = f * scale + bias;          data[i] = f * scale + bias;

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26