Devlog #11: Updated Outline Shader


Hello!

It's Jacob Waugh again. This time I'm going to talk about the updated outline shader for interactable objects. 

As a reference, here is the old shader next to the new shader 

Old ShaderNew Shader

While they look similar here, if you look closely at the cube with the old shader, you can tell the edges aren't a complete outline. The old shader also didn't work with thinner objects like the notes. 

For another comparison, here is the material blueprint for the old and new shaders:

Old GraphNew Graph
Quite the difference, huh?

The way the new shader works is by taking the objects stencil mask (a solid overlay that covers the object with a unique ID) and offsetting it eight times around the object. The stencil mask is then compared to the rest of the visible scene, with any part of the stencil mask is made a solid color.

Here's the shader with a high offset value, allowing you to see the eight different offsets that come together to make the final outline:


In other news, our game has reached gold!

Look forward to a future post more about that!

-Jacob Waugh

Get Edge Case

Leave a comment

Log in with itch.io to leave a comment.