C# Class Nez.DeferredLighting.DeferredSpriteEffect

effect used to render sprites that take part in deferred lighting. A normal map is required. The normal map can optionally use the alpha channel for self illumination by setitng useNormalAlphaChannelForSelfIllumination to true. Note that you need to turn off premultiplied alpha in the Pipeline tool when using the alpha for self illumination!
Inheritance: Microsoft.Xna.Framework.Graphics.Effect
Exibir arquivo Open project: prime31/Nez

Public Methods

Method Description
DeferredSpriteEffect ( ) : System
setAlphaCutoff ( float alphaCutoff ) : DeferredSpriteEffect

alpha cutoff for the alpha test. defaults to 0.3

setNormalMap ( Microsoft.Xna.Framework.Graphics.Texture2D normalMap ) : DeferredSpriteEffect
setSelfIlluminationPower ( float selfIlluminationPower ) : DeferredSpriteEffect

controls the power of the self illumination where 0 is no contribution and 1 is fully self illuminated

setUseNormalAlphaChannelForSelfIllumination ( bool useNormalAlphaChannelForSelfIllumination ) : DeferredSpriteEffect

if true, the normal map alpha channel will be used for self illumination. Note that you need to turn off premultiplied alpha in the Pipeline tool when using the alpha for self illumination!

Method Details

DeferredSpriteEffect() public method

public DeferredSpriteEffect ( ) : System
return System

setAlphaCutoff() public method

alpha cutoff for the alpha test. defaults to 0.3
public setAlphaCutoff ( float alphaCutoff ) : DeferredSpriteEffect
alphaCutoff float Alpha cutoff.
return DeferredSpriteEffect

setNormalMap() public method

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

setSelfIlluminationPower() public method

controls the power of the self illumination where 0 is no contribution and 1 is fully self illuminated
public setSelfIlluminationPower ( float selfIlluminationPower ) : DeferredSpriteEffect
selfIlluminationPower float Self illumination power.
return DeferredSpriteEffect

setUseNormalAlphaChannelForSelfIllumination() public method

if true, the normal map alpha channel will be used for self illumination. Note that you need to turn off premultiplied alpha in the Pipeline tool when using the alpha for self illumination!
public setUseNormalAlphaChannelForSelfIllumination ( bool useNormalAlphaChannelForSelfIllumination ) : DeferredSpriteEffect
useNormalAlphaChannelForSelfIllumination bool If set to true use normal alpha channel for self illumination.
return DeferredSpriteEffect