/[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.14 by jvk, Tue Oct 29 13:24:14 2002 UTC revision 1.15 by jvk, Sat Nov 2 11:42:42 2002 UTC
# Line 31  void GENERATE(TextureParam *params, int Line 31  void GENERATE(TextureParam *params, int
31      FPARAM(invert, 0);      FPARAM(invert, 0);
32      FPARAM(quantize, 255);      FPARAM(quantize, 255);
33      FPARAM(angle, 0);      FPARAM(angle, 0);
34        FPARAM(refsize, 256);
35        enum e_scaling { CONST, LINEAR, SQRT }
36        scaling = (e_scaling)params->getStringEnum("scaling", 0,
37                                                   "const", "linear", "sqrt", 0);
38      int angles = (int)params->getFloat("angles", 0);      int angles = (int)params->getFloat("angles", 0);
39            
40      // Note: radius is specified in texels      // Note: radius is specified in texels
41      FPARAM(radius, 2);      FPARAM(radius, 2);
42    
43        switch (scaling) {
44        case CONST: break;
45        case LINEAR: radius *= (width / refsize); break;
46        case SQRT: radius *= sqrt(width / refsize); break;
47        }
48    
49      // Ripple amplitude in texture coordinates      // Ripple amplitude in texture coordinates
50      FPARAM(ripple_scale, 0.25);      FPARAM(ripple_scale, 0.25);
51    

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

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