Implemented Voxel Cone Tracing

The first thing to do is to store direct lighting into a 3D texture, through a voxelisation of the scene.
The we generate mipmaps for this 3D texture, to simulate propagation of the direct lighting.

Once this is done, we “trace” cones in an hemisphere, oriented along the normal of each pixel we’re processing.
The goal is to cover the hemisphere with those cones, in order to retrieve the indirect lighting received by this pixel.
We trace several cones for the diffuse part of lighting, and an additional thin cone, which orientation is determined by the viewer position, to compute the specular reflection.

Here are the results in Castor3D:

Castor3D – Version 0.10.0

PBR rendering support, implemented both Metallic and Specular workflows.


  • Renamed namespace Castor to castor.
  • Added ChangeTracked and GroupChangeTracked classes, allowing to track changes to a member variable.
  • Renamed CubeBox and SphereBox to BoundingBox and BoundingSphere.
  • Splitted Colour in two classes: RgbColour and RgbaColour.
  • PlaneEquation is no more a template class.
  • Created a buddy allocator class: BuddyAllocator.


  • GlslWriter class now holds the shader program inputs, to generate a glsl::Shader source.


  • Renamed namespace Castor3D to castor3d.
  • Emissive in a material is now stored on a single floating point (emissive maps still hold a colour though).
  • Implemented Physical Based Rendering, using both metallic/roughness and specular/glossiness workflows.
  • RenderPipeline now also holds the shader program.
  • Implemented Screen Space Subsurface Scattering (without backlit transmittance, though).
  • The light pass result is now stored in two render targets: diffuse and specular.
  • Vertex buffers now use a buddy allocated pool.
  • Shadow mapping now uses variance shadow maps.
  • Transparent meshes are now rendered using Weighted Blended OIT rendering.
  • Screen Space Ambiant Occlusion has been improved, using Scalable Ambiant Obscurance implementation.
  • Parallax Occlusion mapping is implemented.
  • Reflection and refraction mapping have been implemented.
  • Deferred rendering has been fully integrated to the engine, for opaque objects rendering.
  • Created components for submeshes, to move functionalities out of Submesh, and make it more flexible.
  • Rendering now uses a depth prepass.
  • Created ColourSkybox, to handle background colour and skyboxes in the same way.
  • Created ShaderBuffer class, to be able to handle SSBOs or TBOs in a similar way, choosing the most appropriate one, depending on running machine.


  • Created DiamondSquareTerrain plugin.


  • Events from CastorGUI are now forwarded to the user.


  • Removed almost every importer plugin, keeping only Assimp, OBJ, and PLY importers.


  • Created SMAA post effect.
  • Created Kawase Light Streaks post effect.
  • Created Film Grain post effect.


  • Updated GlRenderSystem to support the features provided by Castor3D.


  • Technique plugins have been completely removed.

Tone mappings

  • Created Uncharted 2 tone mapping plugin.


  • Fixed bounding boxes for animated meshes and skinned meshes.
  • Repaired an reenabled frustum culling.
  • Fixed alpha rejection.



Castor3D Installer (Windows x86).
Castor3D Installer (Windows x64).
Castor3D Installer (Debian amd64).

PBR rendering VS SSR rendering:

Terrain generation using Diamond square algorithm:

Reflection/Refraction map:


Subsurface Scattering: