terpage.glsl is the reference block (tpSlot, tpUV, terHeight, terHeightSmooth, terNormalXZ, terOrtho, tpOrthoRes, tpOrthoLod), pasted by section into terrain.vert, terrain.frag, tersun.frag, model.vert, grass.vert and grass.mesh. u_tp_on = 0 reads the old samplers with the old coordinates and filtering; on, a resident tile is read at level 0 from u_tp_h / u_tp_nrm / u_tp_ortho, anything else from the coarse map now bound under the old names. The B-splines use the FULL map's texel and take every tap through the page, so a tile edge stays one surface; blurred photograph reads (lod 1-2.5) stay on u_ortho with the level moved down by the coarse map's ratio. The fragment stages drop their unused u_height. SPIR-V rebuilt: terrain programs carry 23 samplers (21 in the fragment stage), up from 19. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3.7 KiB
3.7 KiB