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. |
Members
-
<static> DebugMode
-
A collection of debug render modes to inspect some steps in the render pipeline.
Properties:
Name Type Default Description NONE0 AMBIENT_OCCLUSION1 NORMALS2 DEPTH3 SHADOW_MAP4 MOTION_VECTORS5 -
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 cameraThe
Camerafrom which to view the scene.sceneThe
Sceneto render.dtThe milliseconds passed since last frame.