TerrainParameters
Description
- Derived from
-
RenderEffectParameters abstract
Render effect parameters for ITerrainEffect.
The following low-level render effect parameter slots are always defined:
-
'g_layerBlend', RenderEffectParameterType.Vector3, mapped to LayerBlend.
-
'g_terrainHighlight', RenderEffectParameterType.Vector4, mapped to Highlight.
-
'g_vertexBlend', RenderEffectParameterType.Vector4, mapped to VertexBlend.
-
CameraParameters, mapped to Camera.
-
DecalParameters, mapped to Decal.
-
LightingParameters, mapped to Lighting.
-
TerrainMaterialParameters with TerrainMaterialParameters.FlagNoDisplacement = TerrainFeatureLevel.DX9, mapped to Material.
-
ShadowParameters, mapped to Shadow.
-
TerrainTextureParameters with TerrainTextureParameters.FlagNoTextureArray = TerrainFeatureLevel.DX9, mapped to Texture.
Public / Constants
FlagEmulating
Specifies that a non Direct3D 9 graphics context is emulating the TerrainFeatureLevel.DX9 feature level (for example OpenGL).
When this flag is used, use of texture arrays will be enabled and the count of materials per pass will be 4.
Public / Methods
CreateEffect
Tries to create a ITerrainEffect with the highest feature level between featureLevelMin opt and featureLevelMax opt.
- RenderException
-
If a graphics subsystem error has occurred.
FeatureLevelMax
Determines the maximum TerrainFeatureLevel that is supported by the given graphics context in.
FeatureLevelMin
Determines the minimum TerrainFeatureLevel that is supported by the given graphics context in.
Public / Attributes
Highlight
Custom color value to blend the terrain to (used for highlighting mesh sectors).
Defaults to 0
.
- See also
VertexBlend
Coefficients to use for blending vertex data between LOD levels:
x := screenSpace / terrainSpace * cameraDistance y := x * x z := qualityThresholdInScreenSpace w := log2(pi * z * z)
x
may be obtained by passing (1, 1)
to Viewport.Project.
z
may be obtained by getting IMeshDynamic.QualityThreshold.
w
is the screen-space area of circle with radius z.
Set to (0,0,-1,-1)
to use maximum LOD everywhere.
Defaults to Vec4F.Zero.
- See also