postprocessing icon indicating copy to clipboard operation
postprocessing copied to clipboard

Implement LensFlareEffect

Open vanruesc opened this issue 1 year ago • 7 comments

Description

Implement a LensFlareEffect.

References:

  • https://www.froyok.fr/blog/2021-09-ue4-custom-lens-flare/

Tasks

  • [ ] Create LensFlareEffect.
  • [ ] Create lens-flare demo.
  • [ ] Add unit test.

Implementation Details

See https://github.com/pmndrs/postprocessing/issues/616 regarding flare/glare.

vanruesc avatar Feb 15 '24 18:02 vanruesc

Leaving this here as a reference for a nice and customizable LensFlare postprocessing pass created by @ektogamat and @N8python.

https://github.com/N8python/nektoFlare

kitaedesigns avatar Oct 08 '24 01:10 kitaedesigns

Thanks @kitaedesigns . This one is very performance oriented. It is not relying on raycasters to detect occlusion. Support more than a 100 instances without changing the fps

ektogamat avatar Oct 08 '24 01:10 ektogamat

Hello! I recently created a lens flare effect based on the article mentioned, although it lacks starburst and anamorphism. Source: https://github.com/takram-design-engineering/three-geospatial/blob/main/packages/effects/src/LensFlareEffect.ts Demo: https://takram-design-engineering.github.io/three-geospatial/?path=/story/effects-lens-flare--basic

I’d happy to contribute if it’s relevant to this issue and aligns with your performance and feature goals.

shotamatsuda avatar Feb 14 '25 19:02 shotamatsuda

Fantastic work @shotamatsuda !!! Congratulations!

ektogamat avatar Feb 14 '25 19:02 ektogamat

That looks great 👍

@shotamatsuda Feel free to send a PR for v6 since it's already in that format. We can port it to v7 later.

vanruesc avatar Feb 14 '25 21:02 vanruesc

Got it. It’ll take some time to refactor and bring it in line with the other codes, but I’ll be sure to make a PR for this. (Glad because I was looking for a good place to integrate a pure post-processing effect.) 🌟

shotamatsuda avatar Feb 14 '25 22:02 shotamatsuda

@shotamatsuda FYI: please only create a new v6 manual demo for testing purposes. The older v6 demos are obsolete.

(Background info: https://github.com/pmndrs/postprocessing/issues/324#issuecomment-2646350033)

vanruesc avatar Feb 15 '25 16:02 vanruesc