public readonly record struct GrassTerrainSourceWhat the scatter samples the ground from, on the device.
Remarks
⚠ The textures the terrain renderer already owns, named rather than re-created. A scatter with its own copy of the heightmap would be a second upload of the same megabytes and a second thing to invalidate when a stroke lands.
⚠ The tile geometry is required, not defaulted, because the atlas packs each tile as its own block and a flat map over is right only for a single-tile terrain. TerrainAtlas is where the numbers come from — the same three Terrain.rvn binds.
Fields and properties (14)
public TextureViewHandle HeightMapThe composited heights, one texel per sample.
public TextureViewHandle WeightMapThe weightmap holding the bound layer.
public TextureViewHandle HoleMapWhere the terrain has no surface at all.
public SamplerHandle HeightSamplerHow the heights are read.
public SamplerHandle WeightSamplerAnd the weights.
public SamplerHandle HoleSamplerAnd the holes — clamped, unfiltered, at level 0.
public int WeightChannelWhich of the weightmap's four channels the layer is.
public Vector2 HeightMapSizeHow many texels the atlas is.
public Vector2 HeightRangeWhat a stored height of 0 and 1 mean, in metres.
public float MetresPerQuadHow far apart two samples are.
public Vector3 OriginWhere the terrain's low corner is, in world space.
public float TileSamplesHow many samples one tile's block is, on a side.
public float TileQuadsHow many quads that is — one fewer, because the blocks duplicate their boundary samples.
public Vector2 AtlasTilesHow many tiles the atlas holds, along each axis.
Methods (1)
public GrassTerrainSource(TextureViewHandle HeightMap, TextureViewHandle WeightMap, TextureViewHandle HoleMap, SamplerHandle HeightSampler, SamplerHandle WeightSampler, SamplerHandle HoleSampler, int WeightChannel, Vector2 HeightMapSize, Vector2 HeightRange, float MetresPerQuad, Vector3 Origin, float TileSamples, float TileQuads, Vector2 AtlasTiles)What the scatter samples the ground from, on the device.
Used by (5)
- GrassDispatchVixen.Rendering.Terrain
- GrassDispatchTestsVixen.Rendering.Terrain.Tests
- GrassDrawPassTestsVixen.Rendering.Terrain.Tests
- TerrainRendererVixen.Rendering.Terrain
- TerrainSceneRendererVixen.Rendering.Terrain