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
ActionThe render delegate (is called once for every shader pass)
material
XMaterialThe material to be used by this shader;
null
for device texturecamera
CameraThe 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
ActionThe render delegate (is called once for every shader pass)
material
XMaterialThe material to be used by this shader;
null
for device texturelights
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
DirectionalLightThe DirectionalLight to get the information from
index
intThe light index in the shader to set
material
XMaterialThe 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
PointLightThe PointLight to get the information from
index
intThe light index in the shader to set
material
XMaterialThe currently active material