C# Class FlatRedBall.Graphics.PostProcessing.PostProcessingEffectBase

Base class for post-processing effects
Afficher le fichier Open project: vchelaru/FlatRedBall Class Usage Examples

Méthodes publiques

Свойство Type Description
mTexture Microsoft.Xna.Framework.Graphics.Texture2D

Protected Properties

Свойство Type Description
mEffect Microsoft.Xna.Framework.Graphics.Effect
mEnabled bool
mRenderTargetFormat SurfaceFormat
mScreenRectangle Microsoft.Xna.Framework.Rectangle

Méthodes publiques

Méthode Description
Draw ( Camera camera, Microsoft.Xna.Framework.Graphics.Texture2D &screenTexture, Rectangle &baseRectangle, Color clearColor ) : void

Draws the effect using the drawn screen texture Base method draws screen texture with current effect to current screen rectangle

DrawIfEnabled ( Camera camera, Microsoft.Xna.Framework.Graphics.Texture2D &screenTexture, Rectangle &baseRectangle, Color clearColor ) : void

Draws this effect if it is enabled (helper method)

InitializeEffect ( ) : void

Loads the effect and initializes values in the shader Base method sets the screen rectangle to full-screen

PostProcessingEffectBase ( ) : System

Creates a basic post-processing effect

PostProcessingEffectBase ( Effect effect ) : System

Uses the specified effect as a default post-processing effect

PostProcessingEffectBase ( String effectPath ) : System

Loads the specified effect as a default post-processing effect

PostProcessingEffectBase ( String effectPath, String contentManagerName ) : System

Loads the specified effect as a default post-processing effect

ToString ( ) : string

Reports this effect's name as a string

Update ( ) : void

Update the post processing effect

Méthodes protégées

Méthode Description
DrawToTexture ( Camera camera, Microsoft.Xna.Framework.Graphics.Texture2D &destinationTexture, Color clearColor, Microsoft.Xna.Framework.Graphics.Texture2D &screenTexture, Rectangle &sourceRectangle ) : void
SetEffectParameters ( Camera camera ) : void

Sets the effect's parameters before drawing (override and implement this in your own effects)

Private Methods

Méthode Description
DrawToCameraRenderTarget ( Camera camera, Microsoft.Xna.Framework.Graphics.Texture2D &texture, Color clearColor, Rectangle &sourceRectangle ) : void

This function MUST be overridden for any effects that make passes with multiple techniques.

DrawToCurrentTarget ( Camera camera, Microsoft.Xna.Framework.Graphics.Texture2D &texture, Color clearColor, Rectangle &sourceRectangle ) : void
UpdateToScreenSize ( ) : void

Method Details

Draw() public méthode

Draws the effect using the drawn screen texture Base method draws screen texture with current effect to current screen rectangle
public Draw ( Camera camera, Microsoft.Xna.Framework.Graphics.Texture2D &screenTexture, Rectangle &baseRectangle, Color clearColor ) : void
camera Camera The camera to use when drawing.
screenTexture Microsoft.Xna.Framework.Graphics.Texture2D The screen texture.
baseRectangle Microsoft.Xna.Framework.Rectangle The rectangle to draw to.
clearColor Color The background color.
Résultat void

DrawIfEnabled() public méthode

Draws this effect if it is enabled (helper method)
public DrawIfEnabled ( Camera camera, Microsoft.Xna.Framework.Graphics.Texture2D &screenTexture, Rectangle &baseRectangle, Color clearColor ) : void
camera Camera The camera to use when drawing
screenTexture Microsoft.Xna.Framework.Graphics.Texture2D The screen texture
baseRectangle Microsoft.Xna.Framework.Rectangle The rectangle to draw to
clearColor Color The color to use as transparent
Résultat void

DrawToTexture() protected méthode

protected DrawToTexture ( Camera camera, Microsoft.Xna.Framework.Graphics.Texture2D &destinationTexture, Color clearColor, Microsoft.Xna.Framework.Graphics.Texture2D &screenTexture, Rectangle &sourceRectangle ) : void
camera Camera
destinationTexture Microsoft.Xna.Framework.Graphics.Texture2D
clearColor Color
screenTexture Microsoft.Xna.Framework.Graphics.Texture2D
sourceRectangle Microsoft.Xna.Framework.Rectangle
Résultat void

InitializeEffect() public méthode

Loads the effect and initializes values in the shader Base method sets the screen rectangle to full-screen
public InitializeEffect ( ) : void
Résultat void

PostProcessingEffectBase() public méthode

Creates a basic post-processing effect
public PostProcessingEffectBase ( ) : System
Résultat System

PostProcessingEffectBase() public méthode

Uses the specified effect as a default post-processing effect
public PostProcessingEffectBase ( Effect effect ) : System
effect Microsoft.Xna.Framework.Graphics.Effect
Résultat System

PostProcessingEffectBase() public méthode

Loads the specified effect as a default post-processing effect
public PostProcessingEffectBase ( String effectPath ) : System
effectPath String
Résultat System

PostProcessingEffectBase() public méthode

Loads the specified effect as a default post-processing effect
public PostProcessingEffectBase ( String effectPath, String contentManagerName ) : System
effectPath String
contentManagerName String
Résultat System

SetEffectParameters() protected méthode

Sets the effect's parameters before drawing (override and implement this in your own effects)
protected SetEffectParameters ( Camera camera ) : void
camera Camera
Résultat void

ToString() public méthode

Reports this effect's name as a string
public ToString ( ) : string
Résultat string

Update() public méthode

Update the post processing effect
public Update ( ) : void
Résultat void

Property Details

mEffect protected_oe property

The effect for this post processing effect
protected Effect,Microsoft.Xna.Framework.Graphics mEffect
Résultat Microsoft.Xna.Framework.Graphics.Effect

mEnabled protected_oe property

Whether or not this effect is enabled
protected bool mEnabled
Résultat bool

mRenderTargetFormat protected_oe property

The surface format for the render target for this effect (default is SurfaceFormat.Color)
protected SurfaceFormat mRenderTargetFormat
Résultat SurfaceFormat

mScreenRectangle protected_oe property

The screen rectangle
protected Rectangle,Microsoft.Xna.Framework mScreenRectangle
Résultat Microsoft.Xna.Framework.Rectangle

mTexture public_oe property

The texture that was rendered by the render target
public Texture2D,Microsoft.Xna.Framework.Graphics mTexture
Résultat Microsoft.Xna.Framework.Graphics.Texture2D