Extensions - Dual depth peeling rendering

Transparency without peeling

Jzy3d achieves blending by first rendering "what stands far", and then "what stands near". Its works well for scene containing homogeneous sized objects, such as tesselated surfaces, bar charts or scatter. In some case, this method provides unsatisfying visual results for the following reasons:

  • First, the method is not suitable when working with nested/intersecting drawables, because choosing how to rank polygon might be a complicated task (Jzy3d uses only the barycenter of polygons).
  • Second, working with numerous polygons will lead to bad rendering performances, as the polygons' decomposition and ranking will be computed at each frame update for each primitive drawable type.

Transparency with peeling

Depth peeling algorithms allow a scene graph order independent transparency of intersecting objects. The left column pictures show translucent elements that are rendered with the default API's ordering method. The right column pictures show the same elements rendered by a dual depth peeling algorithm.

Our implementation of depth peeling is based on works released by L. Bavoil & Kevin Myers (NVIDIA) proposing several variants, all of them being ported in Jzy3d:

  • Dual depth peeling
  • Front to back peeling
  • Weighted average peeling
  • Weighted sum peeling

If NVIDIA link changed, you may find the original document explaining peeling here.

Peeling is implemented with GLSL shaders and thus requires a GPU able to compile and run shaders. This extension bundle a set of tools to easily work with several vertex and fragment shaders, which opens the door to you new image processing technics using modern programmable GPU. Polygon ordering
Depth peeling


The depth peeling eclipe project is linked to the core api project to remain up to date with master. To work with the API sources and examples, you will have to checkout the two projects on Github.


Some laptops may have a non activated Nvidia chip on board and instead an integrated graphics chip running (e.g. Intel), which leads to GLSL linking failure. Look at this screenshot to see how to configure your NVidia control panel.

Maturity - Prototype

  • Tested successfully on a Windows7 laptop with a NVidia GPU
  • Some problems to run peeling based code on Ubuntu for the moment
  • Not tested on mac yet

Other extensions