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
renderActionThe render delegate (is called once for every shader pass)
materialXMaterialThe material to be used by this shader;
nullfor device texturecameraCameraThe camera for transformation information
lightsLightSource[]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
renderActionThe render delegate (is called once for every shader pass)
materialXMaterialThe material to be used by this shader;
nullfor device texturelightsLightSource[]An array of all lights this shader should consider;
nullfor 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
lightDirectionalLightThe DirectionalLight to get the information from
indexintThe light index in the shader to set
materialXMaterialThe 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
lightPointLightThe PointLight to get the information from
indexintThe light index in the shader to set
materialXMaterialThe currently active material