An outline effect made with threejs'postprocessing library. It uses sobel edge detection to verify edges in the depth and normal textures of the scene.
-
Depth texture edge detection causes aliased lines, needs smoothing. Note: passing in
resolution * devicePixelRatio
makes this better. Adding an<SMAA>
pass makes it smooth as butter! Although I feel like this is expensive... -
Could use a surface ID textures for better lines as outlined here.
-
Thin/faded lines are far distances (use depth texture to do this)?