Skip to main content

Candera Engine 3D

Occlusion Culling

This new feature allows to disable rendering of the objects when they are not currently seen by the camera because they are obscured by other objects. Occlusion culling becomes enabled when the render strategy for camera is set to OcclusionCullingCameraRenderStrategy. During the rendering, all nodes initialized by the strategy will issue occlusion queries. If query results are available from the previous frame, they are evaluated and all nodes deemed occluded will have their bounding box rendered invisibly instead of the node itself. Visible nodes, or nodes not having a QueryProperty attached, will be rendered as usual. A new query to determine visibility for the next frame will be issued regardless the result of the previous query.


Drawcall Batching by implicit Geometry Instancing

On OpenGL ES3.0 platforms, Candera's renderer automatically batches draw calls of nodes where possible, and issues a single instanced draw call per batch (Geometry Instancing) instead of submitting an individual draw call per node.

To trigger draw call batching, the following prerequisites must be met:

  • an instance-able shader must be used, and the corresponding Candera::Shader object must have its maximum instance count set accordingly.
  • nodes must share the vertex buffer, shader, textures, and render mode
  • nodes must not use multi-pass appearances
  • nodes must not use object-space lighting

If prerequisites are not met, nodes will be rendered individually.

In order to achieve good batching rates, nodes should be sorted by shader, or grouped together using a separate camera to guarantee sequenced submission to the renderer.


Renderer Statistics

Renderer::GetStatistics() provides information on how many draw calls, instanced draw calls, instances, vertices, indices, uniforms and SetUniform() calls were submitted to the RenderDevice in the process of executing Renderer::RenderCamera() or Renderer::RenderAllCameras().


CameraRenderStrategy enhanced

CameraRenderStrategy has been enhanced with a new choice "SkipNode" for CameraRenderStrategy::RenderPassAction. The interface has been enhanced with CameraRenderStrategy::SetRenderPassCompleted() and CameraRenderStrategy::Render().