csharp
public sealed class TerrainTileSourceA tile source over a terrain that is already in memory.
Remarks
⚠ Synchronous behind an asynchronous signature, and deliberately so. Compositing a tile's chain is arithmetic over arrays this object already holds; wrapping it in a thread would add a scheduling hop to a few microseconds of work. What the signature buys is that the file-backed source can replace this one without PageResidency changing.
Fields and properties (2)
public int TileSamplesHow many samples a tile is across, which fixes the page size.
public (int X, int Z) TileCountsHow many tiles there are along each axis.
Methods (2)
public TerrainTileSource(Terrain terrain)Reads tiles out of a terrain.
public ValueTask<int> ReadAsync(int tileX, int tileZ, Memory<byte> destination, CancellationToken cancellation)Reads one tile's whole mip chain, packed level after level.
Used by (1)
- TerrainStreamingTestsVixen.Rendering.Terrain.Tests