Break visible texture repetition on large surfaces with variance-preserving
stochastic sampling — the contrast stays, the grid goes. URP and HDRP,
triplanar and biplanar, Unity Terrain splatmaps, height, histogram, macro and
detail blending. Six drop-in shaders including Unity Terrain; Shader Graph
optional.
The problem
One ground texture, tiled a hundred times, reads as a grid. The eye finds the
period in seconds and then sees nothing else. The usual answers all cost
something: more textures cost memory, decals cost draw calls, bigger textures
only move the problem further away.
The approach
Stochastic sampling splits UV space into a triangular lattice and reads the
texture once per cell with its own random offset — and, optionally, its own
rotation. Three of those taps are blended barycentrically.
That alone makes the surface flat, because averaging independent random
variables shrinks variance. This asset computes exactly how much was lost and
puts it back, rather than hiding it:
```
result = mu + (blended - mu) / sqrt( SUM wi^2 )
```
The gain bounds itself. Where one tap dominates, `SUM wi^2` is 1 and nothing is
touched. Where three taps meet equally it is 1/3, so the gain is sqrt(3) — the
most the blend can ever need. Nothing is hand-clamped.
That is why a blend band here looks like more of the same material instead of a
soft patch. Measured: local RMS contrast inside the blend band is 1.035x the
contrast of the dominated core. With the correction switched off, the same
measurement reads 0.78.