Vixen
caa30e12

GrassLitConstants

struct
csharp
public struct GrassLitConstants

The values of GrassLit's uniform block, in C# types.

Read the guide page for this →

Remarks

Field order follows the shader's declaration order, not the block's byte order — the two differ wherever std140 inserted padding, and the writer knows the difference.

Fields and properties (30)

  • public Vector3 LightDirection

    lightDirection at byte 0.

  • public float ShadowConstantBias

    shadowConstantBias at byte 12.

  • public Vector3 LightColor

    lightColor at byte 16.

  • public float ShadowSlopeBias

    shadowSlopeBias at byte 28.

  • public float ShadowFadeRange

    shadowFadeRange at byte 32.

  • public float AmbientIntensity

    ambientIntensity at byte 36.

  • public Matrix4x4 View

    view at byte 48.

  • public Vector3 EnvironmentShL00

    environmentSh.l00 at byte 432.

  • public Vector3 EnvironmentShL1m1

    environmentSh.l1m1 at byte 448.

  • public Vector3 EnvironmentShL10

    environmentSh.l10 at byte 464.

  • public Vector3 EnvironmentShL11

    environmentSh.l11 at byte 480.

  • public Vector3 EnvironmentShL2m2

    environmentSh.l2m2 at byte 496.

  • public Vector3 EnvironmentShL2m1

    environmentSh.l2m1 at byte 512.

  • public Vector3 EnvironmentShL20

    environmentSh.l20 at byte 528.

  • public Vector3 EnvironmentShL21

    environmentSh.l21 at byte 544.

  • public Vector3 EnvironmentShL22

    environmentSh.l22 at byte 560.

  • public Vector2 ShadowTexelSize

    shadowTexelSize at byte 576.

  • public Matrix4x4 ViewProjection

    viewProjection at byte 592.

  • public Vector3 ViewPosition

    viewPosition at byte 656.

  • public float Time

    time at byte 668.

  • public Vector2 WindDirection

    wind.direction at byte 672.

  • public float WindStrength

    wind.strength at byte 680.

  • public float WindFrequency

    wind.frequency at byte 684.

  • public float WindSpeed

    wind.speed at byte 688.

  • public float WindFlutter

    wind.flutter at byte 692.

  • public float WindHeight

    wind.height at byte 696.

  • public float AlphaCutoff

    alphaCutoff at byte 704.

  • public Vector2 TintRange

    tintRange at byte 712.

  • public Vector2 FadeRange

    fadeRange at byte 720.

  • public const int Size

    The block's size in bytes.

Methods (1)

  • public readonly void Write(Span<byte> buffer)

    Writes every value into at its baked offset.

Used by (1)

  • GrassDrawPassVixen.Rendering.Terrain