Click or drag to resize
DigitalRuneTerrainClipmapRenderer Class
Renders the clipmaps of a TerrainNode.
Inheritance Hierarchy
SystemObject
  DigitalRune.Graphics.RenderingSceneNodeRenderer
    DigitalRune.Graphics.RenderingTerrainClipmapRenderer

Namespace: DigitalRune.Graphics.Rendering
Assembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax
public class TerrainClipmapRenderer : SceneNodeRenderer

The TerrainClipmapRenderer type exposes the following members.

Constructors
  NameDescription
Public methodTerrainClipmapRenderer
Initializes a new instance of the TerrainClipmapRenderer class.
Top
Methods
  NameDescription
Public methodCanRender
Determines whether this renderer can handle the specified scene node.
(Overrides SceneNodeRendererCanRender(SceneNode, RenderContext).)
Public methodDispose
Releases all resources used by an instance of the SceneNodeRenderer class.
(Inherited from SceneNodeRenderer.)
Protected methodDispose(Boolean)
Releases the unmanaged resources used by an instance of the SceneNodeRenderer class and optionally releases the managed resources.
(Inherited from SceneNodeRenderer.)
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodRender(SceneNode, RenderContext)
Renders the specified scene node.
(Inherited from SceneNodeRenderer.)
Public methodRender(IListSceneNode, RenderContext)
Renders the specified scene nodes.
(Inherited from SceneNodeRenderer.)
Public methodRender(IListSceneNode, RenderContext, RenderOrder)
Renders the specified scene nodes.
(Overrides SceneNodeRendererRender(IListSceneNode, RenderContext, RenderOrder).)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyIsDisposed
Gets a value indicating whether this instance has been disposed of.
(Inherited from SceneNodeRenderer.)
Public propertyOrder
Gets the draw order of this scene node renderer.
(Inherited from SceneNodeRenderer.)
Top
Remarks

The TerrainClipmapRenderer is a SceneNodeRenderer that handles TerrainNodes. It renders the BaseClipmap and DetailClipmap of the TerrainNode.

Render passes:
This renderer uses the Materials stored in the TerrainLayer. The material needs a render pass called "Base" to render into the BaseClipmap and a render pass called "Detail" to render into the DetailClipmap. TerrainLayers can have render passes for both, "Base" and "Detail".

Clipmap data:
The content of the clipmaps depends on the used materials. The materials of the TerrainLayer material renders into the clipmap. The material of the TerrainNode reads from the clipmap. These materials can be modified to store different data in the clipmaps.

Per default, the BaseClipmap consists of one HalfVector4 texture which stores: (absolute terrain height, world space normal x, world space normal z, hole flag)

Per default, the DetailClipmap consists of three Color textures which store: (world space detail normal x, world space detail normal z, specular power, hole flag), (diffuse R, diffuse B, diffuse B, -), (specular intensity, height, -, -)

Render Target and Viewport:
This renderer changes the current render target of the graphics device because it uses the graphics device to render into the clipmap render targets. The render target and the viewport of the graphics device are undefined after rendering.

See Also