Changeset 1853


Ignore:
Timestamp:
Sep 1, 2012, 12:32:55 PM (7 years ago)
Author:
sam
Message:

tutorial: add some cosmetic white noise.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tutorial/03_noise.lolfx

    r1852 r1853  
    8989{
    9090    vec2 tmp = pass_Rotation * pass_Position;
    91     float test = tmp.x * tmp.y + 0.75 * sin(3.0 * u_Time);
     91    float test = tmp.x * tmp.y + sin(3.0 * u_Time);
     92
     93    /* Add some garbage noise */
     94    test += fract(sin(test * 938.437) * 137.0) / 2.0;
    9295
    9396    vec3 points[4] = (test > 0.0) ? fire : water;
Note: See TracChangeset for help on using the changeset viewer.