TerrainMaterialParameters

Description

sealed class Tinman.Engine.Rendering.Effects.Shared.TerrainMaterialParameters

Derived from

RenderEffectParameters abstract

Shared render effect parameters for material-based texturing of the terrain.

The following low-level render effect parameter slots are always defined:

The following low-level render effect parameter slots are omitted if FlagNoDisplacement is present:

Public / Constants

Changed​Displacement​Horizontal


public constant ChangedDisplacementHorizontal → (1:int32)

Changed flag for DisplacementHorizontal.

Changed​Displacement​Index


public constant ChangedDisplacementIndex → (1 << 1:int32)

Changed flag for DisplacementIndex.

Changed​Displacement​Settings


public constant ChangedDisplacementSettings → (1 << 2:int32)

Changed flag for DisplacementSettings.

Changed​Displacement​Vertical


public constant ChangedDisplacementVertical → (1 << 3:int32)

Changed flag for DisplacementVertical.

Changed​Grid​Lines


public constant ChangedGridLines → (1 << 4:int32)

Changed flag for GridLines.

Changed​Height​Blend


public constant ChangedHeightBlend → (1 << 5:int32)

Changed flag for HeightBlend.

Changed​Horizontal


public constant ChangedHorizontal → (1 << 6:int32)

Changed flag for Horizontal.

Changed​Offset


public constant ChangedOffset → (1 << 7:int32)

Changed flag for Offset.

Changed​Origin


public constant ChangedOrigin → (1 << 8:int32)

Changed flag for Origin.

Changed​Radius


public constant ChangedRadius → (1 << 9:int32)

Changed flag for Radius.

Changed​Rotation


public constant ChangedRotation → (1 << 10:int32)

Changed flag for Rotation.

Changed​Slot


public constant ChangedSlot → (1 << 11:int32)

Changed flag for Slot.

Changed​Vertical


public constant ChangedVertical → (1 << 12:int32)

Changed flag for Vertical.

Flag​Material​Count​Mask


public constant FlagMaterialCountMask → (7:int32)

Bitmask for extracting the material count from the flags that have been passed to RenderEffectParameters.Declare.

The material count must be in the range [1..3].

Flag​No​Displacement


public constant FlagNoDisplacement → (8:int32)

When present, low-level render effect parameter slots that are related to displacement mapping will be omitted.

Modifier​Add


public constant ModifierAdd → (0:int32)

Render effect pass modifier for additive blending.

Modifier​Blend


public constant ModifierBlend → (1:int32)

Render effect pass modifier for alpha-blending.

Modifier​Max


public constant ModifierMax → (1:int32)

Maximum render effect pass modifier.

Public / Constructors

Terrain​Material​Parameters


public constructor TerrainMaterialParameters → ()

Creates a new instance of TerrainMaterialParameters.

Public / Attributes

Displacement​Horizontal


public attribute DisplacementHorizontal → (get,set)

value : ITexture2D

The texture array, indexed by material ID minus Vec2I.X of DisplacementIndex.

The texture array for horizontal displacement textures.

Defaults to null.

Displacement​Index


public attribute DisplacementIndex → (get,set)

value : Vec2I

The texture array indices: Vec2I.X for DisplacementHorizontal, Vec2I.Y for DisplacementVertical.

Material ID of the first slice of the displacement texture arrays.

Defaults to Vec2I.Zero.

Displacement​Settings


public attribute DisplacementSettings → (get,set)

value : Vec2F

The displacement settings:
Vec2F.X: the uniform displacement scale factor.
Vec2F.Y: the tessellation threshold, in screen pixels.

Settings for terrain displacement.

Defaults to (0,1).

Displacement​Vertical


public attribute DisplacementVertical → (get,set)

value : ITexture2D

The texture array, indexed by material ID minus Vec2I.Y of DisplacementIndex.

The texture array for vertical displacement textures.

Defaults to null.

Grid​Lines


public attribute GridLines → (get,set)

value : float32

[>=0]
The grid-line step in material space or 0 to disable.

Shows or hides grid-lines for material space.

Defaults to 0.

Height​Blend


public attribute HeightBlend → (get,set)

value : Vec3F

The coefficient vector, see TerrainLayerMaterial.HeightBlend.

Coefficients for height-based blending of material textures.

Defaults to Vec3F.Zero.

Horizontal


public readonly attribute Horizontal → (RenderEffectParameterArray<TerrainMaterialTextureParameters>)

The terrain texture parameters for the horizontal plane, indexed by material ID.

Offset


public attribute Offset → (get,set)

value : Vec3F

The offset vector, in material-space.

The material-space offset.

Origin


public attribute Origin → (get,set)

value : Vec3D

The texture origin.

Point in terrain-space that is subtracted from the vertex position before calculating material coordinates.

Defaults to Vec3D.Zero.

Radius


public attribute Radius → (get,set)

value : float32

The radius, in terrain-space.

The geocentric terrain radius.

Defaults to 0.

Rotation


public attribute Rotation → (get,set)

value : float64

The rotation angle, in radians.

The material-space rotation.

Defaults to 0.

Slot


public readonly attribute Slot → (RenderEffectParameterArray<TerrainMaterialSlotParameters>)

The parameters for each terrain material slot.

Vertical


public readonly attribute Vertical → (RenderEffectParameterArray<TerrainMaterialTextureParameters>)

The terrain texture parameters for the vertical planes, indexed by material ID.

A terrain material will be rendered with planar texture mapping iff its vertical texture is empty (see TerrainMaterialTextureParameters.IsEmpty). Otherwise, it will be rendered with tri-planar texture mapping.