cyberbotics / webots

Webots Robot Simulator
https://cyberbotics.com
Apache License 2.0
3.23k stars 1.69k forks source link

Lens flare is buggy #939

Open omichel opened 5 years ago

omichel commented 5 years ago

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

highway

fabienrohrer commented 4 years ago

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.

omichel commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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