March 2013
Intermediate to advanced
984 pages
26h 18m
English
As previously mentioned, three methods can be used to generate noise values in a shader. How do you know which is the best choice for your application? A lot depends on the underlying implementation, but generally speaking, if we assume a hardware computation of noise that does not use texturing, the points favoring usage of GLSL built-in noise function are the following:
• It doesn’t consume any texture memory (a 128 × 128 × 128 texture map stored as RGBA with 8 bits per component uses 8MB of texture memory).
• It doesn’t use a texture unit.
• It is a continuous function rather than a discrete one, so it does not look “pixelated” no matter what the scaling is.
• The repeatability of the function should be undetectable, especially ...