Class: Renderer

Renderer

Renderer performs the actual rendering of a Scene as viewed by a Camera to the screen.


new Renderer( [renderTarget])

Parameters:
Name Type Argument Description
renderTarget FrameBuffer <optional>

An optional render target for the Renderer to draw to.

Properties:
Name Type Description
depthPrepass

Defines whether or not a depth pre-pass needs to be performed when rendering. This may improve rendering by spending less time calculating lighting on invisible fragments.

skipEffects

Indicates the output should not apply post-processing effects.

renderTarget

A render target for the Renderer to draw to. If not provided, it will render to the back-buffer.

Author:
  • derschmale <http://www.derschmale.com>

Members


<static> DebugMode

A collection of debug render modes to inspect some steps in the render pipeline.

Properties:
Name Type Default Description
NONE 0
AMBIENT_OCCLUSION 1
NORMALS 2
DEPTH 3
SHADOW_MAP 4
MOTION_VECTORS 5

backgroundColor

The background Color.


camera

The Camera currently being used for rendering.


debugMode

One of {Renderer.DebugMode}. Causes debug data to be rendered instead of the normal view.


shadowMapSize

The size of the shadow atlas texture.

Methods


render(camera, scene, dt)

Renders the scene through a camera. It's not recommended changing render targets if they have different sizes (so splitscreen should be fine). Otherwise, use different renderer instances.

Parameters:
Name Type Description
camera

The Camera from which to view the scene.

scene

The Scene to render.

dt

The milliseconds passed since last frame.