public readonly record struct GrassWindHow a grass type moves.
Remarks
The host half of Displacement.WindParameters, field for field. Two frequencies rather than one, because a single sine reads as mechanical: a slow bend plus a fast flutter is the cheapest thing that looks alive, and it is what the shader already implements.
⚠ No phase, and that is the point of InstanceParameters.WindPhase. The shader's phase comes from world position, which decorrelates two blades a hundred metres apart and does nothing at all for two that are ten centimetres apart — which is every pair of blades in a clump. The per-instance offset is what the scatter draws, so it belongs to the blade rather than to the profile.
Fields and properties (8)
public Vector2 DirectionWhich way it blows, in the XZ plane. Normalised on use.
public float StrengthHow far the slow bend carries, in metres at full stiffness.
public float FrequencyHow many radians of phase a metre of world costs.
public float SpeedHow fast the phase advances with time.
public float FlutterThe high-frequency component, which reads as leaves rather than branches.
public float HeightThe object-space height the sway is normalised against, so the base stays planted.
public static GrassWind StillWind that does nothing.
public static GrassWind BreezeThe settings a new grass type starts from.
Methods (1)
public string? Validate()Why this profile cannot be used, or if it can.
Used by (9)
- GrassDrawPassVixen.Rendering.Terrain
- GrassDrawPassTestsVixen.Rendering.Terrain.Tests
- GrassRendererVixen.Rendering.Terrain
- GrassTypeVixen.Foliage
- TypeRegistrationVixen.Foliage
- Vixen_Foliage_GrassTypeSerializerVixen.Foliage
- Vixen_Foliage_GrassWindSerializerVixen.Foliage
- TerrainGrassSettingsVixen.Editor.Terrain
- TerrainPanelTestsVixen.Editor.App.Tests