fBm in shaders is built by summing noise octaves with exponentially decreasing amplitude and increasing frequency
The practical CG implementation of fBm works iteratively: start with a base noise at frequency 1, then repeatedly double the frequency and multiply amplitude by a gain factor G, accumulating the sum. The gain G = 2^(-H) converts the Hurst exponent to an amplitude-decay rate. The loop runs for a fixed number of octaves (typically 8–16 for terrain); since each noise is half the wavelength of the previous, the term ‘octave’ is borrowed from music. This approach is efficient because broadband noise functions fill the frequency spectrum quickly, requiring far fewer iterations than sine-wave-based synthesis. Detuning octaves slightly (2.01 instead of 2.0) or rotating the domain between octaves breaks up grid artifacts.
Examples
float fbm(in vec2 x, in float H) {
float G = exp2(-H); float f = 1.0; float a = 1.0; float t = 0.0;
for(int i=0; i<8; i++) { t += a*noise(f*x); f *= 2.0; a *= G; }
return t;
}
Assessment
Given this fbm() implementation with H=1.0: (1) what is G? (2) after 3 octaves, what is the amplitude of the third octave? (3) what change would reduce grid alignment artifacts?