Get the latest tech news
How to draw an outline in a video game
🖍️ Explaining multiple techniques for rendering outlines and highlights for real-time applications. This includes vertex object-space as well as screen-space methods. This can be used to render outlines in Unity or Unreal. Outlines can be used for gameplay reasons or aesthetics.
Rendering outlines is a technique that is often used in games either for aesthetic reasons or for supporting gameplay by using it for highlights and selections around an object. This shader implements the fresnel effect and allows us to set the width, power, softness and color of the outline. To resolve this, you can modulate with a mask that is generated from the dot product between the normal vector NNN and the view direction VVV.
Or read this on Hacker News