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 |
|
|