C# Class Nez.DeferredLighting.DeferredLightEffect

Inheritance: Microsoft.Xna.Framework.Graphics.Effect
Afficher le fichier Open project: prime31/Nez Class Usage Examples

Méthodes publiques

Méthode 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

Méthode Description
cacheEffectParameters ( ) : void

Method Details

DeferredLightEffect() public méthode

public DeferredLightEffect ( ) : System
Résultat System

prepareClearGBuffer() public méthode

public prepareClearGBuffer ( ) : void
Résultat void

prepareForFinalCombine() public méthode

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
Résultat void

setAmbientColor() public méthode

public setAmbientColor ( Color color ) : void
color Color
Résultat void

setAreaDirectionalLightDirection() public méthode

public setAreaDirectionalLightDirection ( Vector3 lightDir ) : void
lightDir Vector3
Résultat void

setClearColor() public méthode

public setClearColor ( Color color ) : void
color Color
Résultat void

setColor() public méthode

public setColor ( Color color ) : void
color Color
Résultat void

setLightIntensity() public méthode

public setLightIntensity ( float intensity ) : void
intensity float
Résultat void

setLightPosition() public méthode

public setLightPosition ( Vector3 lightPosition ) : void
lightPosition Vector3
Résultat void

setLightRadius() public méthode

public setLightRadius ( float radius ) : void
radius float
Résultat void

setNormalMap() public méthode

public setNormalMap ( Microsoft.Xna.Framework.Graphics.Texture2D normalMap ) : void
normalMap Microsoft.Xna.Framework.Graphics.Texture2D
Résultat void

setObjectToWorldMatrix() public méthode

public setObjectToWorldMatrix ( Matrix objToWorld ) : void
objToWorld Matrix
Résultat void

setProjectionMatrix() public méthode

public setProjectionMatrix ( Matrix projection ) : void
projection Matrix
Résultat void

setScreenToWorld() public méthode

inverse of Camera.getViewProjectionMatrix
public setScreenToWorld ( Matrix screenToWorld ) : void
screenToWorld Matrix screenToWorld.
Résultat void

setSpecularIntensity() public méthode

public setSpecularIntensity ( float specIntensity ) : void
specIntensity float
Résultat void

setSpecularPower() public méthode

public setSpecularPower ( float specPower ) : void
specPower float
Résultat void

setSpotConeAngle() public méthode

public setSpotConeAngle ( float coneAngle ) : void
coneAngle float
Résultat void

setSpotLightDirection() public méthode

directly sets the light direction
public setSpotLightDirection ( Vector2 lightDirection ) : void
lightDirection Vector2 Light direction.
Résultat void

setSpotLightDirection() public méthode

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.
Résultat void

setWorldToViewMatrix() public méthode

public setWorldToViewMatrix ( Matrix worldToView ) : void
worldToView Matrix
Résultat void

updateForCamera() public méthode

updates the camera matrixes in the Effect
public updateForCamera ( Camera camera ) : void
camera Camera Camera.
Résultat void

updateForLight() public méthode

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

updateForLight() public méthode

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

updateForLight() public méthode

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

updateForLight() public méthode

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

updateForLight() public méthode

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