A water surface shader
More...
|
static Version | MinShaderModel => new Version(1, 1) |
| The minimum shader model version required to use this shader More...
|
|
|
override void | OnEngineSet () |
| Hook that is calld when Engine is set for the first time.
|
|
override void | OnDispose () |
| Hook that is called when the object needs to dispose its internal resources.
|
|
void | SetupLight (PointLight light, int index, XMaterial material) |
| Transfer lighting data from a PointLight to the shader More...
|
|
void | SetupLight (DirectionalLight light, int index, XMaterial material) |
| Transfer lighting data from a DirectionalLight to the shader More...
|
|
virtual void | RunPasses (Action render, XMaterial material, params LightSource[] lights) |
| Runs the actual shader passes More...
|
|
void | ExecuteScript (IEnumerable< SasScriptCommand > script, Action render, Size sceneSize, RenderTarget sceneMap, bool passScipt) |
| Executes a SAS script block More...
|
|
void | ExecuteScript (IEnumerable< SasScriptCommand > script, Action render=null, Size sceneSize=new Size(), RenderTarget sceneMap=null) |
| Executes a SAS post-screen shader technique script block More...
|
|
void | SetShaderParameter< T > (string name, T value) |
| Sets a specific shader parameter. Automatically defers the action if Effect has not been set yet. More...
|
|
void | SetShaderParameter (string name, Color value) |
| Sets a specific shader parameter. Automatically defers the action if Effect has not been set yet. More...
|
|
void | RegisterChild (EngineElement element, bool autoDispose=true) |
| Registers a child EngineElement for automatic Engine setting and Dispose calling. More...
|
|
void | UnregisterChild (EngineElement element) |
| Unregisters a child EngineElement (opposite of RegisterChild). More...
|
|
A water surface shader
- See also
- Water
◆ WaterShader()
OmegaEngine.Graphics.Shaders.WaterShader.WaterShader |
( |
TextureView |
refractionView = null , |
|
|
TextureView |
reflectionView = null |
|
) |
| |
|
inline |
Creates a new instance of the water shader
- Parameters
-
refractionView | A render target storing the refraction of the current view; null for no refraction or reflection |
reflectionView | A render target storing the reflection of the current view; null for no reflection |
◆ Apply()
override void OmegaEngine.Graphics.Shaders.WaterShader.Apply |
( |
Action |
render, |
|
|
XMaterial |
material, |
|
|
Camera |
camera, |
|
|
params LightSource [] |
lights |
|
) |
| |
|
inlinevirtual |
Applies the shader to the content in the render delegate.
- Parameters
-
render | The render delegate (is called once for every shader pass). |
material | The material to be used by this shader; null for device texture. |
camera | The camera for transformation information. |
lights | An array of all lights this shader should consider; should be null . |
Reimplemented from OmegaEngine.Graphics.Shaders.SurfaceShader.
◆ MinShaderModel
Version OmegaEngine.Graphics.Shaders.WaterShader.MinShaderModel => new Version(1, 1) |
|
static |
The minimum shader model version required to use this shader
◆ DullBlendFactor
float OmegaEngine.Graphics.Shaders.WaterShader.DullBlendFactor |
|
getset |
How strongly to factor in DullColor - values between 0 and 1
◆ DullColor
Color OmegaEngine.Graphics.Shaders.WaterShader.DullColor |
|
getset |
The basic color of the water (usually blueish)
◆ ReflectionViewProjection
Matrix OmegaEngine.Graphics.Shaders.WaterShader.ReflectionViewProjection |
|
getset |
The reflected view-projection from the Camera
◆ WaveHeight
float OmegaEngine.Graphics.Shaders.WaterShader.WaveHeight |
|
getset |
The height of waves on the water surface - values between 0 and 0.2
◆ WaveLength
float OmegaEngine.Graphics.Shaders.WaterShader.WaveLength |
|
getset |
The length of waves on the water surface - values between 0 and 1
◆ WindDirection
Matrix OmegaEngine.Graphics.Shaders.WaterShader.WindDirection |
|
getset |
The direction of the wind moving the waves
◆ WindForce
float OmegaEngine.Graphics.Shaders.WaterShader.WindForce |
|
getset |
The strength of the wind moving the waves - values between 0 and 1
The documentation for this class was generated from the following file:
- OmegaEngine/Graphics/Shaders/WaterShader.cs