Selaa lähdekoodia

tutorial: replace white noise with ordered dithering.

legacy
Sam Hocevar sam 12 vuotta sitten
vanhempi
commit
36d49b50e5
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. +2
    -1
      tutorial/03_noise.lolfx

+ 2
- 1
tutorial/03_noise.lolfx Näytä tiedosto

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



Ladataan…
Peruuta
Tallenna