Search Unity

Recreating Blender's "Freestyle" outlines?

Discussion in 'Shaders' started by MELTPACK, May 18, 2022.

  1. MELTPACK

    MELTPACK

    Joined:
    Apr 7, 2017
    Posts:
    151
    I know that it is literally just an outline effect but I've never understood how blender does it so well but a lot of unity scripts can't, especially because even without raytracing blender can still do it. Here's my current implementation of outlines, using Roberts cross depth normals:



    See how dirty these lines look? I'd increase the thickness but since it's sampling in 4 different directions that's just gonna make it all look strange.

    What would be a good way to achieve outlines like blender?