C# Class Nez.DeferredLighting.DeferredLightEffect

Inheritance: Microsoft.Xna.Framework.Graphics.Effect
Mostra file Open project: prime31/Nez Class Usage Examples

Public Methods

Method Description
DeferredLightEffect ( ) : System
prepareClearGBuffer ( ) : void
prepareForFinalCombine ( Microsoft.Xna.Framework.Graphics.Texture2D diffuse, Microsoft.Xna.Framework.Graphics.Texture2D lightMap, Microsoft.Xna.Framework.Graphics.Texture2D normalMap ) : void

sets the two textures required for the final combine and applies the pass

setAmbientColor ( Color color ) : void
setAreaDirectionalLightDirection ( Vector3 lightDir ) : void
setClearColor ( Color color ) : void
setColor ( Color color ) : void
setLightIntensity ( float intensity ) : void
setLightPosition ( Vector3 lightPosition ) : void
setLightRadius ( float radius ) : void
setNormalMap ( Microsoft.Xna.Framework.Graphics.Texture2D normalMap ) : void
setObjectToWorldMatrix ( Matrix objToWorld ) : void
setProjectionMatrix ( Matrix projection ) : void
setScreenToWorld ( Matrix screenToWorld ) : void

inverse of Camera.getViewProjectionMatrix

setSpecularIntensity ( float specIntensity ) : void
setSpecularPower ( float specPower ) : void
setSpotConeAngle ( float coneAngle ) : void
setSpotLightDirection ( Vector2 lightDirection ) : void

directly sets the light direction

setSpotLightDirection ( float degrees ) : void

sets the light direction using just an angle in degrees. 0 degrees points to theright, 90 degrees would be straight down, etc

setWorldToViewMatrix ( Matrix worldToView ) : void
updateForCamera ( Camera camera ) : void

updates the camera matrixes in the Effect

updateForLight ( AreaLight light ) : void

updates the shader values for the light and sets the appropriate CurrentTechnique

updateForLight ( DeferredLight light ) : void

updates the shader values for the light and sets the appropriate CurrentTechnique

updateForLight ( DirLight light ) : void

updates the shader values for the light and sets the appropriate CurrentTechnique

updateForLight ( PointLight light ) : void

updates the shader values for the light and sets the appropriate CurrentTechnique

updateForLight ( SpotLight light ) : void

updates the shader values for the light and sets the appropriate CurrentTechnique

Private Methods

Method Description
cacheEffectParameters ( ) : void

Method Details

DeferredLightEffect() public method

public DeferredLightEffect ( ) : System
return System

prepareClearGBuffer() public method

public prepareClearGBuffer ( ) : void
return void

prepareForFinalCombine() public method

sets the two textures required for the final combine and applies the pass
public prepareForFinalCombine ( Microsoft.Xna.Framework.Graphics.Texture2D diffuse, Microsoft.Xna.Framework.Graphics.Texture2D lightMap, Microsoft.Xna.Framework.Graphics.Texture2D normalMap ) : void
diffuse Microsoft.Xna.Framework.Graphics.Texture2D Diffuse.
lightMap Microsoft.Xna.Framework.Graphics.Texture2D Light map.
normalMap Microsoft.Xna.Framework.Graphics.Texture2D
return void

setAmbientColor() public method

public setAmbientColor ( Color color ) : void
color Color
return void

setAreaDirectionalLightDirection() public method

public setAreaDirectionalLightDirection ( Vector3 lightDir ) : void
lightDir Vector3
return void

setClearColor() public method

public setClearColor ( Color color ) : void
color Color
return void

setColor() public method

public setColor ( Color color ) : void
color Color
return void

setLightIntensity() public method

public setLightIntensity ( float intensity ) : void
intensity float
return void

setLightPosition() public method

public setLightPosition ( Vector3 lightPosition ) : void
lightPosition Vector3
return void

setLightRadius() public method

public setLightRadius ( float radius ) : void
radius float
return void

setNormalMap() public method

public setNormalMap ( Microsoft.Xna.Framework.Graphics.Texture2D normalMap ) : void
normalMap Microsoft.Xna.Framework.Graphics.Texture2D
return void

setObjectToWorldMatrix() public method

public setObjectToWorldMatrix ( Matrix objToWorld ) : void
objToWorld Matrix
return void

setProjectionMatrix() public method

public setProjectionMatrix ( Matrix projection ) : void
projection Matrix
return void

setScreenToWorld() public method

inverse of Camera.getViewProjectionMatrix
public setScreenToWorld ( Matrix screenToWorld ) : void
screenToWorld Matrix screenToWorld.
return void

setSpecularIntensity() public method

public setSpecularIntensity ( float specIntensity ) : void
specIntensity float
return void

setSpecularPower() public method

public setSpecularPower ( float specPower ) : void
specPower float
return void

setSpotConeAngle() public method

public setSpotConeAngle ( float coneAngle ) : void
coneAngle float
return void

setSpotLightDirection() public method

directly sets the light direction
public setSpotLightDirection ( Vector2 lightDirection ) : void
lightDirection Vector2 Light direction.
return void

setSpotLightDirection() public method

sets the light direction using just an angle in degrees. 0 degrees points to theright, 90 degrees would be straight down, etc
public setSpotLightDirection ( float degrees ) : void
degrees float Degrees.
return void

setWorldToViewMatrix() public method

public setWorldToViewMatrix ( Matrix worldToView ) : void
worldToView Matrix
return void

updateForCamera() public method

updates the camera matrixes in the Effect
public updateForCamera ( Camera camera ) : void
camera Camera Camera.
return void

updateForLight() public method

updates the shader values for the light and sets the appropriate CurrentTechnique
public updateForLight ( AreaLight light ) : void
light AreaLight Light.
return void

updateForLight() public method

updates the shader values for the light and sets the appropriate CurrentTechnique
public updateForLight ( DeferredLight light ) : void
light DeferredLight Light.
return void

updateForLight() public method

updates the shader values for the light and sets the appropriate CurrentTechnique
public updateForLight ( DirLight light ) : void
light DirLight Light.
return void

updateForLight() public method

updates the shader values for the light and sets the appropriate CurrentTechnique
public updateForLight ( PointLight light ) : void
light PointLight Light.
return void

updateForLight() public method

updates the shader values for the light and sets the appropriate CurrentTechnique
public updateForLight ( SpotLight light ) : void
light SpotLight Light.
return void