I created this simple shader that attempts to draw geometry contours using ray-tracing. The idea is to send extra rays, parallel to the camera ray, and translate according to the normal of the intersected surface. If the parallel ray hits the same geometry, it's not a contour.
That somehow seems to work, but that still needs a bit of refinement.
The code is in the ContoursRenderer:
And can be easily used with the Brayns viewer, with the following command line arguments:
braynsViewer --module cartoon --renderer contours