webots icon indicating copy to clipboard operation
webots copied to clipboard

Lens flare is buggy

Open omichel opened this issue 6 years ago • 4 comments

As it can be seen in projects/vehicles/worlds/highway.wbt, the lens flare seems wrong:

highway

omichel avatar Oct 01 '19 10:10 omichel

I can indeed reproduce this issue:

highway

Some times, but rarely, it's working fine after reverting the world, or loading another world before:

highway_1

This means it's caused by bad LenseFlare parameters (as I originally thought) but with a real bug. I have to check if this post-processing is applied in the correct target.

fabienrohrer avatar Dec 03 '19 16:12 fabienrohrer

A nice implementation of lens flare in a shader that works with WebGL is provided here: https://www.shadertoy.com/view/4sX3Rs We should try to implement it in Webots and see whether that resolves this bug.

omichel avatar Dec 08 '20 15:12 omichel

Removing the noperspective keyword on the R2020b-rev2 lens_flare.* shaders didn't break the lens flare. It seems they were already broken on the develop branch for another reason.

omichel avatar Dec 09 '20 15:12 omichel

I was wrong, the lens flare are still working on the current develop branch. They are just a little bit tricky to observe (we have to move the viewpoint, turn on the lights of the car to see them well): highway

omichel avatar Dec 09 '20 16:12 omichel