Broken Lens Flare in URP. Any ETA on fix?

Hi,

We’re using Lens Flare in URP12 and they have various problems on different platforms (for example: the lens flare position is wrong if you scale the rendering resolution).
We are on Unity 2021.2.5 and it’s still not fixed.
Any ETA on a fix?
We’re preparing a demo of our game and our milestone is approaching fast.

Thanks!

Hey!

I just checked and this is apparently a known issue.

I asked the developer and he will make a backport to 2021.2 in a few days.

Thanks, very much appreciated! :slight_smile:
We’re using it extensively on Switch.

Any news on this?
Aside from the scaling problem the URP lens flare has various problems on different platforms and is almost unusable right now… :frowning:

I believe he’s made the backport but he’s on vacation for the Holidays so I can’t confirm. I’ll make myself a reminder to check right after the Holidays. I’ll give you an update as soon as he’s back.

Please report bugs if possible. If you do and post here the case ID’s I can have the developers take a look.

A small bump on this, since the bug it’s still not fixed in 2021.2.8f1. :slight_smile:

Is it possible to get an ETA? This is a new features that’s basically been unusable from the start in a lot of cases…

Dang was hoping this would be in 2.8 :frowning:

Some time has passed.

The bug has this “Fix In Review for 12.1.4” in it’s status.
(Unity Issue Tracker - [URP] Lens flare do not account for render scale setting)

But URP “12.1.4” is already out and available in Unity 2021.2.11 AND it still doesn’t fix the issue (at least i hope)
(Changelog | Universal RP | 12.1.15)

And the issue is not just tied to the Render Scale, but rather about resolution of any render target. For example, while rendering on to a Render Texture, the flare’s position is not correct as well.

Any updates?

EDIT: as of URP 12.1.6 available in 2021.2.16f1 seems the render scale doesn’t seem to effect the falres anymore.

URP lens flares still render in the wrong place, at its vertical opposite.
Unity 2021.3.1f1
URP 12.1.6

https://unity3d.com/unity/whats-new/2022.1.0

2022.1.0 is out for 3 days and in the release notes, it seems to be addressed. I don’t have time to check it right now, but I hope this was finally it <3

I just tried URP Lens flares in 2022.1.11f1 and the vertical mirroring bug is still there in WebGL build

Any updates on this?

I have my lens flares inverted in the vertical Y position and the depth map occlusion seems to be inverted

Confirmed. This bug is also on Android using Unity 2022.1.6f

Here would be a temporary solution while we wait for a fix. In LensFlarePass.cs, the DoLensFlareDatadriven procedure must be modified to include the renderscale. For example:

I found out it works in Unity 2022 LTS (also verified it to my device):

So can it be backported?
I found this issue report for Unity 2021 LTS:

Just reproduced this bug again on 6000.0.0f1. Fixed when scaling is 1.0.

Please report a bug about this.
I’ll make sure the developer creates a test to prevent this from regressing again.

Should I include a repro project or is it not necessary?

Yes, please include a simple project to reproduce the bug as well as a step-by-step list of how to reproduce it. The project is used to test the bug fix against.

Reported as
IN-76038

Does not seem to happen on new Unity 6 project, however when I import URP assets from previous versions and I change Render Scale, it shifts the Flare. Managed to track it down to be caused by turning on the Compatibility Settings for RenderGraph.