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:
[csharp]
_renderer.GetPropertyBlock(matPropBlock);
matPropBlock.SetFloat("_Outline", 1);
matPropBlock.SetColor("_OutlineColor", outColor);
_renderer.SetPropertyBlock(matPropBlock);
[/csharp]