Browse Source

tutorial: add some cosmetic white noise.

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

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

@@ -88,7 +88,10 @@ float noise3d(vec3 p)
void main(void)
{
vec2 tmp = pass_Rotation * pass_Position;
float test = tmp.x * tmp.y + 0.75 * sin(3.0 * u_Time);
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;

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



Loading…
Cancel
Save