API Reference

Class List

pc.PostEffect

Base class for all post effects. Post effects take a a render target as input apply effects to it and then render the result to an output render target or the screen if no output is specified.

Summary

Properties

device

The graphics device of the application.

needsDepthBuffer

The property that should to be set to true (by the custom post effect) if a depth map is necessary (default is false).

shader

The shader definition for the fullscreen quad.

vertexBuffer

The vertex buffer for the fullscreen quad.

Methods

render

Render the post effect using the specified inputTarget to the specified outputTarget.

Details

Constructor

PostEffect(graphicsDevice)

Creates new PostEffect.

Parameters

graphicsDevicepc.GraphicsDevice

The graphics device of the application.

Properties

pc.GraphicsDevicedevice

The graphics device of the application. [read only].

booleanneedsDepthBuffer

The property that should to be set to true (by the custom post effect) if a depth map is necessary (default is false).

pc.Shader, nullshader

The shader definition for the fullscreen quad. Needs to be set by the custom post effect (default is null). Used when calling pc.drawFullscreenQuad.

pc.VertexBuffervertexBuffer

The vertex buffer for the fullscreen quad. Used when calling pc.drawFullscreenQuad. [read only].

Methods

render(inputTarget, outputTarget, rect)

Render the post effect using the specified inputTarget to the specified outputTarget.

Parameters

inputTargetpc.RenderTarget

The input render target.

outputTargetpc.RenderTarget

The output render target. If null then this will be the screen.

rectpc.Vec4

(Optional) The rect of the current camera. If not specified then it will default to [0,0,1,1].