Pixel Perfect Outline Shader

If you’ve been accompanying TinyAttack development, you have noticed our text sometimes have pixel perfect outlines, those are generated by a shader at runtime and are customizable!

Since I’ve noticed the Unity community could use a little more help in sharing things, all patrons can now download the shader to use or learn from it!

Download here: TinyFont_Outline_Shaders

It comes with two versions, one of them allow you to directly change the outline color on the Inspector (Best for UI elements) and another use MaterialPropertyBlocks for better instancing management.

An example of using MaterialPropertyBlock:

_renderer.GetPropertyBlock(matPropBlock);
matPropBlock.SetFloat("_Outline", 1);
matPropBlock.SetColor("_OutlineColor", outColor);
_renderer.SetPropertyBlock(matPropBlock);
Liked it? Take a second to support TinyBird Games on Patreon!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.