Vixen
caa30e12

TerrainLitConstants

struct
csharp
public struct TerrainLitConstants

The values of TerrainLit'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 OriginWS

    originWS at byte 0.

  • public float ShadowConstantBias

    shadowConstantBias at byte 12.

  • public Vector3 LightDirection

    lightDirection at byte 16.

  • public float ShadowSlopeBias

    shadowSlopeBias at byte 28.

  • public Vector3 LightColor

    lightColor at byte 32.

  • public float ShadowFadeRange

    shadowFadeRange at byte 44.

  • public Vector3 ViewPosition

    viewPosition at byte 48.

  • public float AmbientIntensity

    ambientIntensity at byte 60.

  • public Matrix4x4 View

    view at byte 64.

  • public Vector3 EnvironmentShL00

    environmentSh.l00 at byte 448.

  • public Vector3 EnvironmentShL1m1

    environmentSh.l1m1 at byte 464.

  • public Vector3 EnvironmentShL10

    environmentSh.l10 at byte 480.

  • public Vector3 EnvironmentShL11

    environmentSh.l11 at byte 496.

  • public Vector3 EnvironmentShL2m2

    environmentSh.l2m2 at byte 512.

  • public Vector3 EnvironmentShL2m1

    environmentSh.l2m1 at byte 528.

  • public Vector3 EnvironmentShL20

    environmentSh.l20 at byte 544.

  • public Vector3 EnvironmentShL21

    environmentSh.l21 at byte 560.

  • public Vector3 EnvironmentShL22

    environmentSh.l22 at byte 576.

  • public Vector2 ShadowTexelSize

    shadowTexelSize at byte 592.

  • public Vector2 TanHalfFov

    tanHalfFov at byte 600.

  • public float NearPlane

    nearPlane at byte 608.

  • public float FarPlane

    farPlane at byte 612.

  • public Matrix4x4 ViewProjection

    viewProjection at byte 624.

  • public Vector2 HeightMapSize

    heightMapSize at byte 688.

  • public float TileSamples

    tileSamples at byte 696.

  • public float TileQuads

    tileQuads at byte 700.

  • public Vector2 AtlasTiles

    atlasTiles at byte 704.

  • public Vector2 HeightRange

    heightRange at byte 712.

  • public float MetresPerQuad

    metresPerQuad 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)

  • TerrainRendererVixen.Rendering.Terrain