Browse Source

tutorial: replace white noise with ordered dithering.

legacy
Sam Hocevar sam 12 years ago
parent
commit
36d49b50e5
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      tutorial/03_noise.lolfx

+ 2
- 1
tutorial/03_noise.lolfx View File

@@ -91,7 +91,8 @@ void main(void)
float test = tmp.x * tmp.y + sin(3.0 * u_Time);

/* Add some garbage noise */
test += fract(sin(test * 938.437) * 137.0) / 2.0;
vec2 d = vec2(16.0, 9.0) * pass_Position;
test += 0.5 * (length(fract(d) - 0.5) - length(fract(d + 0.5) - 0.5));

vec3 points[4] = (test > 0.0) ? fire : water;



Loading…
Cancel
Save