This is due to a filter that limits which prims will be drawn based upon their height above the terrain in OBBRenderer.cs near line 320:
if (
// skip prim in non-finite position
Single.IsNaN(pos.X) || Single.IsNaN(pos.Y) ||
Single.IsInfinity(pos.X) || Single.IsInfinity(pos.Y) ||
// skip prim Z at or above 256m above the terrain at that position, but only if actually above terrain.
// BUG: will still cause discrepencies when the terrain changes height drastically between regions and the prim is in the high "iffy" area.
(pos.X >= 0f && pos.X < 256f && pos.Y >= 0f && pos.Y < 256f && pos.Z >= (MathUtilities.GetBlendedHeight(heightMap, pos.X, pos.Y) + 256f)))
return null;
As noted this will only happen if the prim is near the terrain+256m altitude limit, overlapping into an adjacent region, and the terrain height in the adjacent region has an altitude change enough to invalidate the prim in that region's space.
To solve this the region would have to know the adjacent region's terrain.
This is due to a filter that limits which prims will be drawn based upon their height above the terrain in OBBRenderer.cs near line 320:
As noted this will only happen if the prim is near the terrain+256m altitude limit, overlapping into an adjacent region, and the terrain height in the adjacent region has an altitude change enough to invalidate the prim in that region's space.
To solve this the region would have to know the adjacent region's terrain.