Hello,
I'm currently making a custom shader to apply to some spine skeleton materials, for convenience, I'm doing it in shader graph.
I found myself with two main problems, which I would like to know if anyone knows the answer to.
The first one involves how Spine generates its outline, as I have two requirements, first it would be to preferably do it all in a single call, and secondly, have that outline be part of the color channel and not something like unlit emission, as I want to give that outline some depth with normals, etc.
I searched online for a while, and the "best" way I found to make an outline involved:
A) Having enough whitespace between each skeleton part in the atlas (solved by the spine export settings by default).
And B) Basically making a copy of the atlas, and offsetting that copy for each side (up, down, left, right, optionally diagonals), combine those offseted copies, have the result be the first thing drawn, and draw the skeleton on top.
The issue I'm having with this is pretty much that the end result can sometimes end with jagged outlines (but it all depends on atlas size + outline width), so I was wondering how the now built in outline handled transparency at the edges to be smooth without AA (rather than a direct solution, I'd appreciate if someone helped me with a breakdown of the outline process, for me to understand and tweak as necessary, and to add outline as a sub graph to reuse later).
The second involves the generated spine mesh, which was optimized to sometimes barely scrape the runtime mesh.
I saw in the forums that manually adjusting the mesh of all attachments, to include transparent pixels, was a recommended approach. I was just wondering if there was a more time efficient way to go about it, as this process will also involve taking care of "invisible" pixel deformation, (because I want to add normals, etc), and ensuring the non outline part of the mesh still looks good.
Worst case scenario, I'll start using attachments with opaque outlines, and swap them for transparent outline versions before exporting, or whatever people suggest.
Kind of a long post, but I'd really appreciate if someone could help me with this. Thank you in advance, and have a nice day.