I was looking for an outline implementation that could show all edges (like the middle image), not just the outer boundary (left), like the current outlines post processing example. I couldn’t find one, so I wrote one up and thought I’d share it here.
- Tutorial: https://omar-shehata.medium.com/how-to-render-outlines-in-webgl-8253c14724f9
- Source code: https://github.com/OmarShehata/webgl-outlines/tree/main/threejs
- Live demo (you can drag and drop your own
Hope this is helpful for anyone searching for this particular kind of effect! Happy to hear any feedback about implementation too.
My main “todo” here is to explore switching to a
WebGLMultisampleRenderTarget to remove the need for the FXAA pass.