Drawable Tile Mesh
Color-pass drawable for one mesh tile. Pool-recycled. ShadowCaster + SightlineOccluder gate on shadowMode.castsShadows. The sightline visibility tint is applied per-fragment by Ogc3dTilesProgram's embedded SightlineReceiverGlsl splice; the SURFACE-grouped sightline overlay only tints terrain.
Properties
Set from Tile3d.isFallback at enqueue. Fallback tiles render only where stencil != stencilId so they fill gaps without overlaying finer descendants.
Tile kept alive only as a shadow caster (outside the view frustum): rasterizes in drawShadowDepth / drawSightlineDepth but skips the color pass entirely.
World bounding sphere center of this surface; null opts out of overlay drawing.
World bounding sphere radius around overlayCenter.
Pick color for tile-level pick mode. Batch-level pick uses pickIdBase instead.
First pick id reserved for this tile's batches. Zero = tile-level pick.
World-space bounding sphere center used to skip cascades whose AABB doesn't intersect this caster. Default null opts out of culling — the caster is dispatched into every cascade. Implementations populate this from their shape's boundingBox.center to gain per-cascade culling.
World-space bounding sphere radius. Only consulted when shadowCasterCenter is non-null.
Combined VBO+EBO+batchIds buffer per submesh. Null entry → submesh draw skipped.
Resolved from RR cache at enqueue; null entries → submesh renders without texture. Pooled per instance — ensureSubmeshArrays grows in place to avoid per-frame arrayOfNulls<> allocations across ~hundreds of drawables.
Functions
Surface-shape overlay pass: re-rasterize the mesh with the draping program active so the terrain tile's shape texture paints the mesh surface. Triangles only; the caller owns depth-write and shared stencil state, this tile contributes only its stencilFunc.
Cascade depth pass. Triangles only — lines/points alias on the shadow map.
Sightline depth pass. Triangles only — lines/points alias on the depth cube.
Resize the submesh arrays to hold at least n entries and null-clear the active range. Grows by power-of-two so consecutive enqueues for similar tile shapes avoid re-allocation.
Populated by the layer before enqueue so the depth-pass can cull cheaply.