patriciogonzalezvivo / thebookofshaders

Step-by-step guide through the abstract and complex universe of Fragment Shaders.
http://TheBookOfShaders.com
Other
5.96k stars 677 forks source link

fix: mentioned 'fract' instead of 'rand' #396

Closed WojtekPachowiak closed 1 year ago

WojtekPachowiak commented 1 year ago

we're interpolating between floored points to which rand is additionally applied - not fract.

See also code excerpt:

    // Four corners in 2D of a tile
    float a = random(i);
    float b = random(i + vec2(1.0, 0.0));
    float c = random(i + vec2(0.0, 1.0));
    float d = random(i + vec2(1.0, 1.0));