2d-outlines-urp
2d-outlines-urp copied to clipboard
Usgin this shader with Line Renderer
Thanks for this cool tutorial and shader! Is it possible to use this shader for Line Renderer for the outline?
Unfortunately not - this shader relies on the sprite having some "padding" around it. When the SpriteRenderer is rendered, the entire quad is passed through the shader, and we rely on that fact to ensure we render outlines past the "bounds" of the non-transparent part of the sprite. When a LineRenderer is rendered, there's none of that "padding" because no pixels outside the LineRenderer are rasterised, which means we can't add outlines using this shader. You would need to use a different approach - it might take a bit of work to modify this shader to handle this use case!