Info

Statistics

  • Download count4,371 total downloads
  • Latest download count 2,650 downloads of latest version
  • Average download count3 downloads per day average

Owners

Description

(Webgl2 / WebGPU support) A better outline shader than the one that already exists on the C3 addon stack exchange

Discussion

  • 29 Comments

  • Order by
Want to leave a comment? Login or Register an account!
  • how i activate it

  • Nice effect!

  • Thank you for the great effect, Skymen! It's very very useful. ✨

  • no work on Text

  • Not sure why people are saying it doesn't work on text. The text and spritefont objects can do an outline with bb code.

  • 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?

        Load more comments (2 replies)
  • skymen there is one issue in this effect if we rotate layout 90 or 270 degree by setting its angle then outline streches from one side. see this image

    • Hi, yeah this is an issue with C3's effect compositor. It doesn't provide a good way to get the size of one layout pixel unit across all scales and angles. I use an approximation that hopefully works in most use cases, but assumes that the render target and the layout are aligned which isn't true if the layout is rotated.

      In fact my approximation only works at angles 0 and 180 and breaks on every other angle value, and there is no way to really fix this without also breaking the fact that the outline pixel size is tied to layout pixels.

      If you want, you can modify the effect. In the code you should find a value called "texelSize" which is my approximation, and instead use C3's "pixelSize" value and it should hopefully stop stretching, and you can counter act the wrong pixel size value by using bigger width values

  • Such a problem, I added an outline to the 3d objects, everything works well, but when I render the game in HTML5, launch it from my phone and go to fullscreen, fps starts to drop terribly.Although when the game is not in full screen, everything works fine.How to solve the problem?

  • Is it just me or something changed with construct and now the outline is making the sprite invisible. (Full screen mode). It seems to work on native screen mode, which is 427x240

    Edit: Fixed it. But still a strange bug.

    I changed my setup a bit and forgot about it. It was perspective camera with FOV 5. I changed it back to 10 and it works again.

  • Are there plans to update this addon for use with webgpu? or should i look for an alternative?

  • Load more comments (11 replies)