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
boolShall this shader apply lighting to the terrain?
capabilities
EngineCapabilitiesThe rendering capabilities available to the shader
textureMask
intA 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
BlendWidth
The distance from BlendDistance where to show the pure far texture
public float BlendWidth { get; set; }
Property Value
MinShaderModel
The minimum shader model version required to use this shader
public static Version MinShaderModel { get; }
Property Value
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
ActionThe render delegate (is called once for every shader pass).
material
XMaterialThe material to be used by this shader;
null
for device texture.camera
CameraThe 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()