Sprite Outline Shader

By 27/06/2019 July 4th, 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

There is more!

Read Bonus and Exclusive content, Get Updated when I release new posts, see Behind The Scenes, learn italian words and recipes (it is a joke.. maybe), all for free from your friendly and not-a-corporation febucci! Also, No Spam! Only a few emails each month (and you can unsubscribe at any time)! Give it a try and join us!

Support this blog

From "sharing my posts around" to "contributions on Patreon", this website exists thanks to the support of these awesome people! Please consider supporting me so I can keep producing tutorials for everyone! Thanks!

Become a Patron!