C# Class Fusion.Engine.Graphics.Filter

Class for base image processing such as copying, blurring, enhancement, anti-aliasing etc.
Inheritance: Fusion.Engine.Common.GameModule
Show file Open project: demiurghg/FusionEngine Class Usage Examples

Public Methods

Method Description
Copy ( RenderTargetSurface dst, ShaderResource src ) : void

DownSample4 ( RenderTarget2D dst, RenderTarget2D src ) : void
FillAlphaOne ( RenderTargetSurface dst ) : void

Filter ( Game Game ) : System
Fxaa ( RenderTargetSurface dst, ShaderResource src ) : void

Performs FXAA antialiasing.

GaussBlur ( RenderTarget2D srcDst, RenderTarget2D temporary, float sigma, int mipLevel ) : void

GaussBlurBilateral ( RenderTarget2D srcDst, RenderTarget2D temporary, ShaderResource depthData, ShaderResource normalData, float sigma, float sharpness, int mipLevel ) : void

Initialize ( ) : void

Initializes Filter service

LinearizeDepth ( RenderTargetSurface dst, ShaderResource src ) : void
OverlayAdditive ( RenderTargetSurface dst, ShaderResource src ) : void

PrefilterEnvMap ( RenderTargetCube envMap ) : void

StretchRect ( RenderTargetSurface dst, ShaderResource src, SamplerState filter = null, bool flipToCubeFace = false ) : void

Performs good-old StretchRect to destination buffer with blending.

StretchRect4x4 ( RenderTargetSurface dst, RenderTarget2D src, SamplerState filter = null, bool flipToCubeFace = false ) : void

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Private Methods

Method Description
Enum ( PipelineState ps, ShaderFlags flags ) : void

GaussBlurInternal ( RenderTarget2D srcDst, RenderTarget2D temporary, float sigma, float sharpness, int mipLevel, ShaderResource depthData, ShaderResource normalData ) : void

GaussDistribution ( float x, float sigma ) : float
GetGaussWeightsBuffer ( float sigma, int mipLevel ) : System.Vector4[]
LoadContent ( ) : void

SetDefaultRenderStates ( ) : void

Sets default render state

SetViewport ( RenderTargetSurface dst ) : void

Method Details

Copy() public method

public Copy ( RenderTargetSurface dst, ShaderResource src ) : void
dst Fusion.Drivers.Graphics.RenderTargetSurface target to copy to
src Fusion.Drivers.Graphics.ShaderResource target to copy from
return void

Dispose() protected method

protected Dispose ( bool disposing ) : void
disposing bool
return void

DownSample4() public method

public DownSample4 ( RenderTarget2D dst, RenderTarget2D src ) : void
dst RenderTarget2D
src RenderTarget2D
return void

FillAlphaOne() public method

public FillAlphaOne ( RenderTargetSurface dst ) : void
dst Fusion.Drivers.Graphics.RenderTargetSurface target to copy to
return void

Filter() public method

public Filter ( Game Game ) : System
Game Game
return System

Fxaa() public method

Performs FXAA antialiasing.
public Fxaa ( RenderTargetSurface dst, ShaderResource src ) : void
dst Fusion.Drivers.Graphics.RenderTargetSurface Target buffer to render FXAA to
src Fusion.Drivers.Graphics.ShaderResource Source image with luminance in alpha
return void

GaussBlur() public method

public GaussBlur ( RenderTarget2D srcDst, RenderTarget2D temporary, float sigma, int mipLevel ) : void
srcDst RenderTarget2D
temporary RenderTarget2D
sigma float
mipLevel int
return void

GaussBlurBilateral() public method

public GaussBlurBilateral ( RenderTarget2D srcDst, RenderTarget2D temporary, ShaderResource depthData, ShaderResource normalData, float sigma, float sharpness, int mipLevel ) : void
srcDst RenderTarget2D
temporary RenderTarget2D
depthData Fusion.Drivers.Graphics.ShaderResource
normalData Fusion.Drivers.Graphics.ShaderResource
sigma float
sharpness float
mipLevel int
return void

Initialize() public method

Initializes Filter service
public Initialize ( ) : void
return void

LinearizeDepth() public method

public LinearizeDepth ( RenderTargetSurface dst, ShaderResource src ) : void
dst Fusion.Drivers.Graphics.RenderTargetSurface
src Fusion.Drivers.Graphics.ShaderResource
return void

OverlayAdditive() public method

public OverlayAdditive ( RenderTargetSurface dst, ShaderResource src ) : void
dst Fusion.Drivers.Graphics.RenderTargetSurface target to copy to
src Fusion.Drivers.Graphics.ShaderResource target to copy from
return void

PrefilterEnvMap() public method

public PrefilterEnvMap ( RenderTargetCube envMap ) : void
envMap Fusion.Drivers.Graphics.RenderTargetCube
return void

StretchRect() public method

Performs good-old StretchRect to destination buffer with blending.
public StretchRect ( RenderTargetSurface dst, ShaderResource src, SamplerState filter = null, bool flipToCubeFace = false ) : void
dst Fusion.Drivers.Graphics.RenderTargetSurface
src Fusion.Drivers.Graphics.ShaderResource
filter Fusion.Drivers.Graphics.SamplerState
flipToCubeFace bool
return void

StretchRect4x4() public method

public StretchRect4x4 ( RenderTargetSurface dst, RenderTarget2D src, SamplerState filter = null, bool flipToCubeFace = false ) : void
dst Fusion.Drivers.Graphics.RenderTargetSurface
src RenderTarget2D
filter Fusion.Drivers.Graphics.SamplerState
flipToCubeFace bool
return void