How to get Lens flare working in VRChat game

Hi,
I’m working on a world to explore various visual enhancing techniques.
Lens Flare is one of the very cool things that I wanna try.
However, I struggle to implement this to VRChat. I tried many hours, but still don’t know how to do it correctly. Someone please help me!

What I did so far:
following Unity - Manual: Lens Flare component
–made a sunFlare assest
image
–apply this asset to the light source


–apply a flare layer to main camera
image
–put the main camera to VRCworld reference camara

What I observed so far:
–I can see the lens flare within the editor, and through the camera game view
–But I cannot see the lens flare when I run it
–after adding post processing, post processing is working, but the lens flare is still not

I suspect something went wrong so that the flare layer component on reference camera is not applied to in-game player camera, but I don’t know how to modify player camera other than the reference camera.
Or maybe there’s some other reason to this
Or maybe I missed some steps
Or is it a bug?

I cannot find videos about lens flare specifically for VRChat.
If anyone know how to play with lens flare in VRChat, please help me!

Update:
I did some experiment and confirmed lens flare is working for independent camera in VRChat. The player still cannot see sun flare.
I can suspect:
–the player camera does not receive the flare layer component from the reference camera
–or player camera indeed receive the flare layer component, but disabled it somehow

What I did:
– I add a camera facing the sun flare, and display its view on a quad. The exact same camera is put as reference camera in VRCWorld component

– The sun flare is indeed captured by the camera at run time as shown in the quad. However, the player just cannot see the sun flare at all.


Halo of the sun is displayed in player view, so the Sun is already inside player view.

Independent camera succeeds in displaying sun flare at runtime in VRChat, so sun flare is indeed supported by VRChat.
Hence, something must be wrong with player’s camera setting.

The reference camera is the exact same one as the camera for the quad. Hence, the reference camera has the correct setting.
Hence, I can suspect:
–the player camera did not receive the flare layer component from the reference camera
–or player camera indeed received the flare layer component, but disabled it somehow

Update:
I confirmed the player camera did not receive the flare layer component.

– I notice a player component is generated within Unity during the client simulation. So I can actually check the player object and check the camera. Indeed, there’s no flare layer added to it.

– After manually adding flare layer to player camera, the sun flare finally become visible to the player.

I’m using the client simulation right now, so is it a bug for the simulation, or a bug for the VRC?
– Build and test on game via VRC sdk. And confirmed it’s not working the VRC client build testing

Hence, this is probably
– a bug for VRChat that forget to attach the flare layer to the player camera from reference camera
– or it’s my personal issues, my personal copy of VRC sdk got wrong somehow
– or still maybe I missed out some step to setup lens flare properly for VRChat. Is there supposed to be any steps other than setting the reference camera?

So can you do anything to the player object via udon? I don’t think I’ve seen lense flare in VR in VRC.

No, I don’t think there’s any option to add component at run time as this post indicates.

In addition, I also check Udon# documentatioin, and there’s no mention of camera at all.

The lens flare is indeed rarely used in VR world. But I believe this can make light source more stunning in VR, and lens flare can be a potential solution to mimic Bloom for Questies.

Lens flare is listed in VRChat’s allowed world components


Hence, failing to use lens flare is against what the list promises, so it’s a bug.

Make sure you link to the bug report when you find or create it on feedback.vrchat.com

Thanks
I’ve found a bug report for this problem, and I linked this post there.

In addition, I asked my steamVR friend to have a look, and he can see the lens flare. So this issue is probably not for all platforms.

Currently, I’m using a single particle to mimic a 1 texture simple lens flare.

This is a better than nothing temporary solution. And I haven’t got idea how to mimic more complex lens flare using particles.

Wish VRChat can fix the bug and get lens flare working for all user.