Refine an indexed triangle mesh iterations times by splitting only its
INTERIOR edges, leaving boundary edges — and therefore the exact outline and
its vertex count — untouched. Each interior edge contributes one midpoint that
is shared by the two triangles adjacent to it, so the mesh stays conforming
(no T-junctions) while the boundary loop is preserved exactly. This is what
lets a surface or sea bed be densified for vertex displacement / detail while
its rim still matches, vertex-for-vertex, walls extruded from the same
outline. Only position is interpolated; stale normal/uv are dropped
(recompute afterwards). A no-op without an index or when iterations <= 0.
Refine an indexed triangle mesh
iterationstimes by splitting only its INTERIOR edges, leaving boundary edges — and therefore the exact outline and its vertex count — untouched. Each interior edge contributes one midpoint that is shared by the two triangles adjacent to it, so the mesh stays conforming (no T-junctions) while the boundary loop is preserved exactly. This is what lets a surface or sea bed be densified for vertex displacement / detail while its rim still matches, vertex-for-vertex, walls extruded from the same outline. Onlypositionis interpolated; stalenormal/uvare dropped (recompute afterwards). A no-op without an index or wheniterations <= 0.