(Webgl2 / WebGPU support) A better outline shader than the one that already exists on the C3 addon stack exchange.
Hi, please don't use this to outline text, instead use the [outline] or [outlineback] bbcode with [linethickness] tag to control outline width. Here's the manual about it:
construct.net/en/make-games/manuals/construct-3/plugin-reference/text
About the precision step, it clamps to the outline width, so make it as close to the width value as possible as long as you're happy with the quality.
Anyway, I know the BBCode outline tags can cause issues at higher width values with some fonts, so really only use my effect if you are aware it has a MUCH higher GPU usage than using the BBCode tag, and you using the tag doesn't work. If the font causes issues, I also recommend trying another font to see if that works.
Thanks for the update! Unfortunately, your plugin is our only option, we recently posted this about BBCode outlines and Ashley confirmed it's an engine/browser limitation. Sprite fonts also have weird spacing and kerning with non monospaced fonts:
github.com/Scirra/Construct-bugs/issues/8318
Even with other fonts, BBCode outlines still doesn't work. We'll need to do some tests, but good to know to keep the precision step as close to the font size. Any other recommendations? Any support for Alpha, or we need to generate it behind an effect-free text layer and reduce the opacity?
For the alpha, I keep forgetting exactly how the shader works because I've made alterations in the past to accomodate for people asking for slightly different outline behaviors.
If you know a little bit about shader dev, it should be very easy to change the addon to add a percent parameter and multiply the final outline alpha by your new parameter.
I don't have a lot of time to make that adjustment right now, sorry. If you need help figuring it out, I would recommend heading to the Construct Community Discord server where me or any other shader dev can point you in the right direction :)
Thanks for the heads up. I'll look into the file, worst case, I'll just make a quick function that finds all of the text, duplicates it a z under and adds the effect with the lower opacity haha.