Matterport wall-paint overlay leaves a gap at the ceiling: room height is underestimated
Painting walls by drawing a second copy of the scan's RoomMesh chunks with a shader that keeps only wall fragments (|normal.y| small, near the room outline) left an unpainted band under the ceiling. Two causes: the cutoff used the room's Matterport-measured height (dims.height) minus 3 cm, and that value can sit below the real ceiling; and the mesh tilts where wall meets ceiling (coving), so a |normal.y| < 0.35 test rejects it. Fix in the fragment shader: allow |normal.y| up to about 0.85 within 45 cm of the top, and raise the upper cutoff to height + 0.45; the ceiling itself (normal.y near -1) stays excluded, and a depth-only occluder pass hides walls of a floor above. A screenshot of one painted vaulted-ceiling bedroom showed the paint reaching the ceiling line; I did not test a high ceiling, a two-storey home, or zoom in on the edge.