C# Class Nez.SpriteLightPostProcessor

post processor to assist with making blended sprite lights. Usage is as follows: - render all sprite lights with a separate Renderer to a RenderTarget. The clear color of the Renderer is your ambient light color. - render all normal objects in standard fashion - add this PostProcessor with the RenderTarget from your lights Renderer
Inheritance: PostProcessor
ファイルを表示 Open project: prime31/Nez

Public Methods

Method Description
SpriteLightPostProcessor ( int executionOrder, RenderTexture lightsRenderTexture ) : System
onAddedToScene ( ) : void
onSceneBackBufferSizeChanged ( int newWidth, int newHeight ) : void
process ( RenderTarget2D source, RenderTarget2D destination ) : void

Method Details

SpriteLightPostProcessor() public method

public SpriteLightPostProcessor ( int executionOrder, RenderTexture lightsRenderTexture ) : System
executionOrder int
lightsRenderTexture Nez.Textures.RenderTexture
return System

onAddedToScene() public method

public onAddedToScene ( ) : void
return void

onSceneBackBufferSizeChanged() public method

public onSceneBackBufferSizeChanged ( int newWidth, int newHeight ) : void
newWidth int
newHeight int
return void

process() public method

public process ( RenderTarget2D source, RenderTarget2D destination ) : void
source Microsoft.Xna.Framework.Graphics.RenderTarget2D
destination Microsoft.Xna.Framework.Graphics.RenderTarget2D
return void