Sprite Outline Shader

By 27/06/2019 October 1st, 2019 Shaders

In this “Unity Sprite Outline” tutorial we’ll discover how to create both a “Sprite Innerline” and a “Outer Sprite Outline”.
Simply, the Inner Sprite Outline shader is drawn “inside” the sprite, while “Outer” is the opposite.

Read more about “Texture’s Texel Size” here.


Download Files

Download files (10$ Patreon Tier).

Included in the Unity Package:

  • Inner line & Outline Shaders made with HLSL,
  • Shaders made with Amplify,
  • Shaders made in Shader Graph
  • A Master Shader (HLSL) that lets you choose the outline size. You can also switch between “Inner” and “Outer” via a “toggle” in the Inspector.

HLSL

Inner Sprite Outline HLSL

 

Outer Sprite Outline HLSL

To have achieve an “Outline” instead of an “Innerline”, just change the “outline” line (in the previous code snippet) into this:

 


Amplify Shader

Inner Sprite Outline ASE

Outer Sprite Outline ASE

You can unsubscribe from the newsletter at any time, give it a try!

Support my current and future work ^^ As a thank, you will receive exclusive rewards!

Become a Patron!