(Webgl2 / WebGPU support) A better outline shader than the one that already exists on the C3 addon stack exchange
Hey, this fixes a LOT of issues for our game! We're using it to outline our text. Two questions:
1) Any way to have alpha for the outline it created? We're aiming to have our white text with 80% opacity for our outline.
2) Is there a limit for how high the precision step value can be for optimal performance? 50? 500? We can input 5000 with 16 samples and it still looks great.
Many thanks!
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?
Nice effect!
Thank you for the great effect, Skymen! It's very very useful. ✨
no work on Text
Hey folks! For those that want to have an outline effect for your text - as skymen has mentioned, this plug-in will be an intense resource hog. You can try using the BBcode [outlineback] (see documentation here construct.net/en/make-games/manuals/construct-3/plugin-reference/text )
However, you might run into some odd spiky bugs in some characters depending on the font. You can try to tweak the font by editing the vectors here: tophix.com/font-tools/font-editor
It's not trivial but at least you get both: The font you want and an outline that will not tank your performance.
Amazing, thank you!
Not sure why people are saying it doesn't work on text. The text and spritefont objects can do an outline with bb code.
I tested this and bb codes like that don't work on spritefonts. Just text objects.
Omg...Thanks!
i.imgur.com/dlPdg0F.png
any ideas how can i set thickness of outline? (when i use stroke i receive only outline without inner color)
Hello, I noticed important performance impact after upgrading from an old version (1.4.3 to 2.1.0.1) in a project with extensive use of this effect (hundreds of sprites and spritetexts).
- Are there any known reason that can explain this ?
- Do outlines and alpha require more calculation ?
Thanks !
Hi, the performance should not be that much worse, but it's possible that you switched to webgpu that is known for having performance issues with shaders sometimes
Thank you for your answer, I switched to webgpu indeed but have same performance with webgl2 and didn't really notice any difference between the two. Redrawing all sprites with oultines was the only solution for now.
новый
Is there a way to have the outline not extend beyond the character? Instead, have it scale inner, rather than outer?
Hi, this would not be an outline, but an inset shadow or glow. This outline doesnt support this.
Not a problem, I managed to make a plugin that allowed it. Thanks!