Table of Contents

Class TerrainShader

Namespace
OmegaEngine.Graphics.Shaders
Assembly
OmegaEngine.dll

A shader that blends multiple textures together

public class TerrainShader : LightingShader, IDisposable
Inheritance
TerrainShader
Implements
Inherited Members
Extension Methods

Constructors

TerrainShader(bool, EngineCapabilities, int)

Creates a specialized instance of the shader

public TerrainShader(bool lighting, EngineCapabilities capabilities, int textureMask)

Parameters

lighting bool

Shall this shader apply lighting to the terrain?

capabilities EngineCapabilities

The rendering capabilities available to the shader

textureMask int

A bitmask that indicates which textures are enabled

Exceptions

NotSupportedException

The graphics card does not support this shader.

Properties

BlendDistance

The distance at which to show the pure near texture

public float BlendDistance { get; set; }

Property Value

float

BlendWidth

The distance from BlendDistance where to show the pure far texture

public float BlendWidth { get; set; }

Property Value

float

MinShaderModel

The minimum shader model version required to use this shader

public static Version MinShaderModel { get; }

Property Value

Version

Methods

Apply(Action, XMaterial, Camera, params LightSource[])

Applies the shader to the content in the render delegate.

public override void Apply(Action render, XMaterial material, Camera camera, params LightSource[] lights)

Parameters

render Action

The render delegate (is called once for every shader pass).

material XMaterial

The material to be used by this shader; null for device texture.

camera Camera

The camera for transformation information.

lights LightSource[]

An array of all lights this shader should consider. Mustn't be null!

OnEngineSet()

Hook that is called when Engine is set for the first time.

protected override void OnEngineSet()

See Also