MAX_ SAMPLES_ PER_ SIDE
Hard upper bound on samplesPerSide. At 4096² each of the output RGBA8 + R32F sampler textures is 64 MB GPU; the host-side ping-pong elevation buffers add another 128 MB combined. Above this, GL_MAX_TEXTURE_SIZE caps come into play on weaker GPUs and kernel runtime gets impractical (O(N³) walks).