BBMOD_DefaultRenderer

Extends BBMOD_BaseRenderer

constructor

new BBMOD_DefaultRenderer()

Description

The default renderer.

Properties

Name Description
EnableGBuffer Enables rendering scene depth into a depth buffer during the BBMOD_ERenderPass.DepthOnly render pass pass. Defaults to false.
EnableSSAO Enables screen-space ambient occlusion. This requires the depth buffer. Defaults to false. Enabling this requires the SSAO submodule!
GBufferScale Resolution multiplier for the depth buffer surface. Defaults to 1.
SSAOAngleBias SSAO angle bias in radians. Default value is 0.03.
SSAOBlurDepthRange Maximum depth difference over which can be SSAO samples blurred. Defaults to 2.
SSAODepthRange Maximum depth difference of SSAO samples. Samples farther away from the origin than this will not contribute to the effect. Default value is 10.
SSAOPower Strength of the SSAO effect. Should be greater than 0. Default value is 1.
SSAORadius Screen-space radius of SSAO. Default value is 16.
SSAOScale Resolution multiplier for SSAO surface. Defaults to 1.
SSAOSelfOcclusionBias Defaults to 0.01. Increase to fix self-occlusion.

Example

Following code is a typical use of the renderer.

// Create event
renderer = new BBMOD_DefaultRenderer()
    .add(OCharacter)
    .add(OTree)
    .add(OTerrain)
    .add(OSky);
renderer.UseAppSurface = true;
renderer.EnableShadows = true;

camera = new BBMOD_Camera();
camera.FollowObject = OPlayer;

// Step event
camera.set_mouselook(true);
camera.update(delta_time);
renderer.update(delta_time);

// Draw event
camera.apply();
renderer.render();

// Post-Draw event
renderer.present();

// Clean Up event
renderer = renderer.destroy();

See also

BBMOD_Camera, BBMOD_IRenderable

Do you find this page helpful?

Copyright © 2023, BlueBurn. Built on February 04, 2023 using GMDoc.