Two sources of visible chunk-boundary squares:
1. Derivative-based bump mapping (bumpStrength=9) used dFdx/dFdy which
are invalid across draw-call boundaries, producing strong normal
discontinuities at every chunk edge. Fade bump to zero near chunk
edges using LayerUV as the chunk-space distance metric.
2. sampleAlpha used an abrupt step() to switch between point-sampled
and 4-tap-blurred alpha, creating a visible ring 2 texels from each
chunk edge. Replace with smoothstep transition and a 5-tap average
that includes the center sample.
- Fix HeightMap::getHeight() to use interleaved 17-wide row layout
matching MCVT storage (was using wrong 9-wide contiguous indexing)
- Guard terrain bump mapping normalize against zero-length vectors
to prevent NaN propagation and GPU faults
Replaces single-tap shadow sampling with 3x3 grid PCF (36-sample equivalent
with hardware bilinear filtering) for smooth shadow edges. Adds normal-offset
bias to eliminate shadow acne on oblique surfaces without peter-panning.