C# Класс FlatRedBall.Graphics.PostProcessing.PostProcessingEffectBase

Base class for post-processing effects
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
mTexture Microsoft.Xna.Framework.Graphics.Texture2D

Защищенные свойства (Protected)

Свойство Тип Описание
mEffect Microsoft.Xna.Framework.Graphics.Effect
mEnabled bool
mRenderTargetFormat SurfaceFormat
mScreenRectangle Microsoft.Xna.Framework.Rectangle

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
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)

Приватные методы

Метод Описание
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

Описание методов

Draw() публичный Метод

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.
Результат void

DrawIfEnabled() публичный Метод

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
Результат void

DrawToTexture() защищенный Метод

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
Результат void

InitializeEffect() публичный Метод

Loads the effect and initializes values in the shader Base method sets the screen rectangle to full-screen
public InitializeEffect ( ) : void
Результат void

PostProcessingEffectBase() публичный Метод

Creates a basic post-processing effect
public PostProcessingEffectBase ( ) : System
Результат System

PostProcessingEffectBase() публичный Метод

Uses the specified effect as a default post-processing effect
public PostProcessingEffectBase ( Effect effect ) : System
effect Microsoft.Xna.Framework.Graphics.Effect
Результат System

PostProcessingEffectBase() публичный Метод

Loads the specified effect as a default post-processing effect
public PostProcessingEffectBase ( String effectPath ) : System
effectPath String
Результат System

PostProcessingEffectBase() публичный Метод

Loads the specified effect as a default post-processing effect
public PostProcessingEffectBase ( String effectPath, String contentManagerName ) : System
effectPath String
contentManagerName String
Результат System

SetEffectParameters() защищенный Метод

Sets the effect's parameters before drawing (override and implement this in your own effects)
protected SetEffectParameters ( Camera camera ) : void
camera Camera
Результат void

ToString() публичный Метод

Reports this effect's name as a string
public ToString ( ) : string
Результат string

Update() публичный Метод

Update the post processing effect
public Update ( ) : void
Результат void

Описание свойств

mEffect защищенное свойство

The effect for this post processing effect
protected Effect,Microsoft.Xna.Framework.Graphics mEffect
Результат Microsoft.Xna.Framework.Graphics.Effect

mEnabled защищенное свойство

Whether or not this effect is enabled
protected bool mEnabled
Результат bool

mRenderTargetFormat защищенное свойство

The surface format for the render target for this effect (default is SurfaceFormat.Color)
protected SurfaceFormat mRenderTargetFormat
Результат SurfaceFormat

mScreenRectangle защищенное свойство

The screen rectangle
protected Rectangle,Microsoft.Xna.Framework mScreenRectangle
Результат Microsoft.Xna.Framework.Rectangle

mTexture публичное свойство

The texture that was rendered by the render target
public Texture2D,Microsoft.Xna.Framework.Graphics mTexture
Результат Microsoft.Xna.Framework.Graphics.Texture2D