pmndrs / postprocessing

A post processing library for three.js.
zlib License
2.37k stars 213 forks source link

Convolution Bloom (FFT) or Bloom with custom flares textures #616

Closed kitaedesigns closed 7 months ago

kitaedesigns commented 8 months ago

Would it be possible to implement a version of Bloom with either a Convolution Kernel or with an option for custom flare textures? Looking to create an effect similar to the new PostProcessing Anamorphic Demo to simulate Bloom in real-world lenses better. This in combination with the new Lens Distortion, Lens Flare, and Noise would look amazing.

Anamorphic Demo https://threejs.org/examples/?q=anam#webgpu_postprocessing_anamorphic

Convolution Bloom https://docs.unrealengine.com/5.0/en-US/bloom-in-unreal-engine/

vanruesc commented 8 months ago

I'm planning on implementing the glare effect described in https://www.froyok.fr/blog/2021-09-ue4-custom-lens-flare. There's a ticket for LensFlareEffect (#581) which could also implement that aspect. I'll add the anamorphic example to the list of references in that ticket.

Convolution Bloom from UE is not really suited for realtime rendering, so I don't see much benefit in adding it at this time. Quoting from the docs:

Bloom Convolution is designed for use with with in-game or offline cinematics or on high-end hardware, while the Standard bloom should be used for most game applications.

In other words: anamorphic bloom/glare is already planned, but the approach will likely be different compared to three/UE.

kitaedesigns commented 8 months ago

Gotcha, that all makes sense. I can probably provide you with some Flare textures for testing as well.

There's also this repo from Anderson Mancini for Lens Flares that doesn't use PostProcessing in case it's of interest. https://github.com/ektogamat/lensflare-threejs-vanilla

vanruesc commented 7 months ago

Closing in favor of #581.