Vixen
02b45cc4
csharp
public static class TerrainPaint

The paint kernels: what a stamp does to the layer weights under it.

Read the guide page for this →

Remarks

Four tools over the selected target layer — [docs/plan/31 § The paint tools]. Paint raises its weight and lowers the others proportionally, Smooth averages, Flatten sets it to the brush strength, and Noise scatters it. They are the sculpt tools' shape applied to a different target, which is [§ D12]'s argument for one brush.

⚠ Every one of these goes through Paint rather than writing a channel. That method is where the sum-to-one invariant lives — raise one layer and the rest come down in proportion, by largest remainder — and a kernel that wrote the byte itself would be a second implementation of the rule, disagreeing with the first by a unit or two per sample. Which is exactly the drift Verify reports and nobody can explain.

⚠ The target layer is an index and the tools do not check it against the brush. A paint layer has no lock and no generator — that is the edit layer stack, which is a different thing with a similar name. What refuses a paint stroke is having no target selected, and that is the editor's question.

Methods (5)

Used by (6)

  • TerrainPaintTestsVixen.Terrain.Tests
  • TerrainSplatTestsVixen.Rendering.Terrain.Tests
  • TerrainWeightStrokeVixen.Terrain
  • TerrainWeightmapTestsVixen.Terrain.Tests
  • TerrainEditVixen.Editor.Terrain
  • TerrainPaintModeTestsVixen.Editor.Terrain.Tests