C# Class Nez.GaussianBlurEffect

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

Private Properties

Property Type Description
computeGaussian float

Public Methods

Method Description
GaussianBlurEffect ( ) : System
calculateSampleWeights ( ) : void

calculates the sample weights and passes them along to the shader

prepareForHorizontalBlur ( ) : void

prepares the Effect for performing a horizontal blur

prepareForVerticalBlur ( ) : void

prepares the Effect for performing a vertical blur

setBlurEffectParameters ( float dx, float dy, Vector2 offsets ) : void

computes sample weightings and texture coordinate offsets for one pass of a separable gaussian blur filter.

Private Methods

Method Description
computeGaussian ( float n ) : float

Evaluates a single point on the gaussian falloff curve. Used for setting up the blur filter weightings.

Method Details

GaussianBlurEffect() public method

public GaussianBlurEffect ( ) : System
return System

calculateSampleWeights() public method

calculates the sample weights and passes them along to the shader
public calculateSampleWeights ( ) : void
return void

prepareForHorizontalBlur() public method

prepares the Effect for performing a horizontal blur
public prepareForHorizontalBlur ( ) : void
return void

prepareForVerticalBlur() public method

prepares the Effect for performing a vertical blur
public prepareForVerticalBlur ( ) : void
return void

setBlurEffectParameters() public method

computes sample weightings and texture coordinate offsets for one pass of a separable gaussian blur filter.
public setBlurEffectParameters ( float dx, float dy, Vector2 offsets ) : void
dx float
dy float
offsets Vector2
return void