Vixen
02b45cc4
csharp
public readonly record struct GrassTerrainSource

What the scatter samples the ground from, on the device.

Read the guide page for this →

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.

Fields and properties (11)

  • public TextureViewHandle HeightMap

    The composited heights, one texel per sample.

  • public TextureViewHandle WeightMap

    The weightmap holding the bound layer.

  • public TextureViewHandle HoleMap

    Where the terrain has no surface at all.

  • public SamplerHandle HeightSampler

    How the heights are read.

  • public SamplerHandle WeightSampler

    And the weights.

  • public SamplerHandle HoleSampler

    And the holes — clamped, unfiltered, at level 0.

  • public int WeightChannel

    Which of the weightmap's four channels the layer is.

  • public Vector2 HeightMapSize

    How many samples the heightmap is.

  • public Vector2 HeightRange

    What a stored height of 0 and 1 mean, in metres.

  • public float MetresPerQuad

    How far apart two samples are.

  • public Vector3 Origin

    Where the terrain's low corner is, in world space.

Methods (1)

Used by (3)

  • GrassDispatchVixen.Rendering.Terrain
  • GrassDispatchTestsVixen.Rendering.Terrain.Tests
  • GrassDrawPassTestsVixen.Rendering.Terrain.Tests