Table of Contents

Class SurfaceShader

Namespace
OmegaEngine.Graphics.Shaders
Assembly
OmegaEngine.dll

A shader that controls the look of a PositionableRenderable's surface

public abstract class SurfaceShader : Shader, IDisposable
Inheritance
SurfaceShader
Implements
Derived
Inherited Members
Extension Methods

Methods

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

Applies the shader to the content in the render delegate

public virtual 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

RunPasses(Action, XMaterial, params LightSource[])

Runs the actual shader passes

protected virtual void RunPasses(Action render, XMaterial material, 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

lights LightSource[]

An array of all lights this shader should consider; null for no lighting

SetupLight(DirectionalLight, int, XMaterial)

Transfer lighting data from a DirectionalLight to the shader

protected void SetupLight(DirectionalLight light, int index, XMaterial material)

Parameters

light DirectionalLight

The DirectionalLight to get the information from

index int

The light index in the shader to set

material XMaterial

The currently active material

SetupLight(PointLight, int, XMaterial)

Transfer lighting data from a PointLight to the shader

protected void SetupLight(PointLight light, int index, XMaterial material)

Parameters

light PointLight

The PointLight to get the information from

index int

The light index in the shader to set

material XMaterial

The currently active material

See Also