C# 클래스 hyades.graphics.PostProcessor

파일 보기 프로젝트 열기: zfedoran/bubblebound 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
color_rt Microsoft.Xna.Framework.Graphics.RenderTarget2D
depth_rt Microsoft.Xna.Framework.Graphics.RenderTarget2D
result_rt Microsoft.Xna.Framework.Graphics.RenderTarget2D

공개 메소드들

메소드 설명
Bloom ( RenderTarget2D source, RenderTarget2D result, float threshold, float bloom_intensity, float base_intensity, float bloom_saturation, float base_saturation ) : void

Applies a bloom effect to the specified render target, writes the result to the specified render target.

Blur ( RenderTarget2D source, RenderTarget2D result, float sigma ) : void

Applies a blur to the specified render target, writes the result to the specified render target.

DepthBlur ( RenderTarget2D source, RenderTarget2D result, RenderTarget2D depthTexture, float sigma ) : void

Applies a blur to the specified render target, using a depth texture to prevent pixels from blurring with pixels that are "in front"

DepthOfField ( RenderTarget2D source, RenderTarget2D result, RenderTarget2D depthTexture, Camera camera, DepthOfFieldType dofType, float focalDistance, float focalWidth, float time ) : void

Performs tone mapping on the specified render target

FlushCache ( ) : void

Disposes all intermediate textures in the cache

GetInstance ( GraphicsDevice device ) : PostProcessor
PostProcessor ( GraphicsDevice device ) : System

The class constructor

비공개 메소드들

메소드 설명
GenerateDownscaleTargetHW ( RenderTarget2D source, RenderTarget2D result ) : void

Downscales the source to 1/16th size, using hardware filtering

GenerateDownscaleTargetSW ( RenderTarget2D source, RenderTarget2D result ) : void

Downscales the source to 1/16th size, using software(shader) filtering

GetIntermediateTexture ( int width, int height, SurfaceFormat format ) : IntermediateTexture

Checks the cache to see if a suitable rendertarget has already been created and isn't in use. Otherwise, creates one according to the parameters

GetIntermediateTexture ( int width, int height, SurfaceFormat format, int msQuality ) : IntermediateTexture
PostProcess ( RenderTarget2D source, RenderTarget2D result, Effect effect ) : void

Performs a post-processing step using a single source texture

Swap ( RenderTarget2D &rt1, RenderTarget2D &rt2 ) : void

Swaps two RenderTarget's

메소드 상세

Bloom() 공개 메소드

Applies a bloom effect to the specified render target, writes the result to the specified render target.
public Bloom ( RenderTarget2D source, RenderTarget2D result, float threshold, float bloom_intensity, float base_intensity, float bloom_saturation, float base_saturation ) : void
source Microsoft.Xna.Framework.Graphics.RenderTarget2D The render target to use as the source
result Microsoft.Xna.Framework.Graphics.RenderTarget2D The render target to use as the result
threshold float
bloom_intensity float
base_intensity float
bloom_saturation float
base_saturation float
리턴 void

Blur() 공개 메소드

Applies a blur to the specified render target, writes the result to the specified render target.
public Blur ( RenderTarget2D source, RenderTarget2D result, float sigma ) : void
source Microsoft.Xna.Framework.Graphics.RenderTarget2D The render target to use as the source
result Microsoft.Xna.Framework.Graphics.RenderTarget2D The render target to use as the result
sigma float The standard deviation used for gaussian weights
리턴 void

DepthBlur() 공개 메소드

Applies a blur to the specified render target, using a depth texture to prevent pixels from blurring with pixels that are "in front"
public DepthBlur ( RenderTarget2D source, RenderTarget2D result, RenderTarget2D depthTexture, float sigma ) : void
source Microsoft.Xna.Framework.Graphics.RenderTarget2D The render target to use as the source
result Microsoft.Xna.Framework.Graphics.RenderTarget2D The render target to use as the result
depthTexture Microsoft.Xna.Framework.Graphics.RenderTarget2D The depth texture to use
sigma float The standard deviation used for gaussian weights
리턴 void

DepthOfField() 공개 메소드

Performs tone mapping on the specified render target
public DepthOfField ( RenderTarget2D source, RenderTarget2D result, RenderTarget2D depthTexture, Camera camera, DepthOfFieldType dofType, float focalDistance, float focalWidth, float time ) : void
source Microsoft.Xna.Framework.Graphics.RenderTarget2D The source render target
result Microsoft.Xna.Framework.Graphics.RenderTarget2D The render target to which the result will be output
depthTexture Microsoft.Xna.Framework.Graphics.RenderTarget2D The render target containing scene depth
camera Camera The camera used to render the scene
dofType DepthOfFieldType The type of DOF effect to apply
focalDistance float The distance to the camera focal point
focalWidth float The width of the camera focal point
time float
리턴 void

FlushCache() 공개 메소드

Disposes all intermediate textures in the cache
public FlushCache ( ) : void
리턴 void

GetInstance() 공개 정적인 메소드

public static GetInstance ( GraphicsDevice device ) : PostProcessor
device GraphicsDevice
리턴 PostProcessor

PostProcessor() 공개 메소드

The class constructor
public PostProcessor ( GraphicsDevice device ) : System
device GraphicsDevice The GraphicsDevice to use for rendering
리턴 System

프로퍼티 상세

color_rt 공개적으로 프로퍼티

public RenderTarget2D,Microsoft.Xna.Framework.Graphics color_rt
리턴 Microsoft.Xna.Framework.Graphics.RenderTarget2D

depth_rt 공개적으로 프로퍼티

public RenderTarget2D,Microsoft.Xna.Framework.Graphics depth_rt
리턴 Microsoft.Xna.Framework.Graphics.RenderTarget2D

result_rt 공개적으로 프로퍼티

public RenderTarget2D,Microsoft.Xna.Framework.Graphics result_rt
리턴 Microsoft.Xna.Framework.Graphics.RenderTarget2D