Non photo-realistic rendering with OpenGL ES

Screenshot_20190725-145012Screenshot_20190725-145000

Inspired by the EDL shading technique and SSAO, I implemented a new shader for OpenGL ES designed to enhance the rendering of point clouds. As the shading function rely only on the projected depth, and because the variable gl_FragDepth is missing in OpenGL ES, a workaround was to implement a custom depth buffer using a frameBuffer object.

In practice, the multi-pass rendering is done in 2 steps:

  1. Create a new frameBuffer and render the scene as usual with this new frameBuffer bound as the active one.
  2. Bind to the default frameBuffer, then draw a quad that spans the entire screen with the new frameBuffer’s color buffer as its texture.

(See https://learnopengl.com/Advanced-OpenGL/Framebuffers for more details)

This shading functions is available as an experimental feature in Lidar VR Viewer.

My final algorithm is inspired by this one

Continue reading