[SOLVED] Trying to fit Shadertoy flare

I am trying to fit a Shadertoy flare, as showed at

Does not work while trying to migrate:

[Tried a lot already] But a slow blinking effect is all I get

Project:
https://playcanvas.com/project/1017373/settings

Hi @Thomas_Due_Nielsen,

Most likely you will need to adapt the texel sizes used in the shader to the viewport resolution.

I know this isn’t much help, but transferring that kind of shaders requires a lot patience and tries.

Good luck,

2 Likes

Before I close this entirely:
I think I remember that You / @yaustar mentioned a sentence like “Flare effect will not become a part of PlayCanvas”. Regardless of it does become a viable/functional effect: In case of; how You researched it (or had background knowledge on the ‘Flare effect’ in here, at Three.js (three.js examples) or Unity), how did You come to the conclusion Steve? (for better overview: this post evolves around a Shadertoy lens flare effect, that does not seem to platform-migrate by at least 4 shadertoy examples).

Lens flare in Three.js is an add on object, it’s not part of the Three.js core engine (and in good reason).

Similarly there is little sense in adding something like that as a core feature of the PlayCanvas engine. I think that’s what @yaustar meant with that.

But creating an example/addon script for that is definitely doable and welcomed. PlayCanvas is open source and if you’d like to do this, it will be most welcomed.

1 Like

Leonidas is correct here, an effect like that won’t be a core feature. If we do add it, it be like the other post processing effects. Separate files that can added to projects.

ok, I might be able to if I turn my insights towards shadercoding in the future (one’s brain seem to need a cerrtain wiring for it )

  • but for one of my “quite secretive” projects I have already have - sort - of a ‘semibitmap mechanical’ flare effect, which code can some extra things in comparison to all the four shadertoy example (so I am, as such, not completely lost in that sense)
    Setting this as ‘solved’, as “Flare as posteffect” might come to fruition from some random fourth person in our community.

One thing though, Yaustar: If I am to use a font flare symbol like: :eight_pointed_black_star: (to use as a “spartneous poor man’s” compromise to my upcoming users / for now in first-project-version)
cf the flare in font size 400 [vector line points presentation] here as well

Could I then make the ‘metal gold’ material within Tutorial: Normal Mapped Text | Learn PlayCanvas transparent, in order to enforce this remaining / rudimentary yet vector-based font- and 2D-object as a lens flare at certain locations?
(turning the 2D object towards camera should be the least of it afterwards)

Sorry, I don’t understand what you are asking?

The “Engraving” text in Tutorial: Normal Mapped Text | Learn PlayCanvas is font- and thereby vectorbased. Enlarging the small “star/lens shaped” character would be a somewhat good compromise (especially for upstarting and less realism-oriented 2D games / PlayCanvas apps).

The symbol/character enlarged (cannot change its color): :eight_pointed_black_star:

This would imply for one to make the rest of sphere and plane in the tutorial example invisible - leaving the symbol (at least the highlight effect of the edge upon this star symbol) :slight_smile:

Give it a try and see how it looks/works

Ok, did try. But a certain problem arises regarding the star, as the font types seem to have some sort of ISO-limitation in the example.
If I write in the symbol, the example interpretates and write “:eight-point star:” instead of an actual star shape.

Could it be possible to make the Tutorial: Normal Mapped Text | Learn PlayCanvas example with “optional/imported fonts” as within the editor’s text-elements otherwise?
(this way one has the option of playing with the chr-codes in more depth … for instance: it is possible use special characters there [such as certain ISO nordic letters as ‘æ’, ‘ø’ and ‘å’ etc])

If the font supports it then yes



1 Like

nice, ok will try and fiddle with it againg then …

Tried them all beneath the “Font Family” dropdown:

  • same outcome

That’s because you have the text set as :eight_pointed_black_star: and not the emoji itself.

It should be:

:eight_pointed_black_star: is a custom format that some programs (eg this forum) will parse and convert to an emoji.

2 Likes