Simulating diffusion lens effect?

Trying to replicate this lens effect in Three.js, is there any known post processing effect that gives these rays?

I tried UnrealBloom already but it’s not the effect i’m looking for and it massively decreased my performance.

Do you mean the sparkles? That probably could be done with Bloom or UnrealBloom, probably with a voronoi and a cross at those cells to strengthen the effect, cheaper could be heavily downscaling the render target and then get the flares from this lower resolution. Just quick thoughts on it.

Shadertoy got something:
https://www.shadertoy.com/view/MssczX

1 Like

/cc

This looks really good, thanks! Will look into it.

Once I ported this http://john-chapman-graphics.blogspot.com/2013/02/pseudo-lens-flare.html?m=1 to threejs. It basically works by rendering an high contrast “version” of the scene into smaller buffers, enlarge it back, blur it and then render to the screen. If interested I can put a gist online.

1 Like

Hi!

Is there any chance to see the result of your port? :slightly_smiling_face:

Hi, here’s a little video I recorder: https://twitter.com/i/status/1111646276079288320

I can put the code online if you want, but it’s a little messy

You could provide just a link to a working example :slightly_smiling_face:
Thanks for sharing the video! :beers: