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:

1 Like


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

Once I ported this 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.


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

Hi, here’s a little video I recorder:

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: