Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

VR Lens Flare on Quest

Discussion in 'Universal Render Pipeline' started by Aaron_999, May 2, 2022.

  1. Aaron_999

    Aaron_999

    Joined:
    Jan 11, 2022
    Posts:
    2
    Does anyone know how I can create Lens Flare in URP that will work on Oculus Quest? I've searched everywhere, and can't figure out how to do this. I've tried various URP Lens Flares from the Asset Store, but they only show up in the Unity Scene window, not on the Quest itself, nor does it show up in the Unity Game window.

    I know that Unity 2021.2 has built in lens flare, but overall VR support for Quest only works with Unity 2020.3.

    To be clear, I can see the lens flare in scene window, but not game window or on the VR headset. I have tried adding a 'Flare Layer' component to the Main Camera of the XR Rig as well and it still doesn't work.

    I have also tried enabling the HDR option within the URP settings and this doesn't work.

    Any ideas or insights would be appreciated.
     
    Last edited: May 2, 2022
    CD-WR likes this.
  2. cameron_balmer

    cameron_balmer

    Joined:
    Aug 3, 2020
    Posts:
    1
    Try enabling Post Processing in your Main Camera settings. That worked for me and I was able to get the flare showing. However, in my own case, the position of the flare (sun flare) is not correct, so I think there may be a further issue with this.

    Positioning of the flare is correct in scene view and it looks great, however in VR my sun flare is placed at a lower, almost ground level. Really not sure what the issue is here or if there's another setting I have missed. Would be interested to hear if you had any better luck.
     
  3. Aaron_999

    Aaron_999

    Joined:
    Jan 11, 2022
    Posts:
    2
    Thanks I will give this a try...
     
  4. boyerarthur

    boyerarthur

    Joined:
    Jul 11, 2022
    Posts:
    1
    Hey,

    Same issue here, the flares only appear at the bottom of the headset (HTC Vive Cosmos). It looks like weird artefacts.
    The sun flare (a strong one) display a white rectangle at the bottom.
    Although, flares appear in the scene, and in the game window.
     
  5. rz_0lento

    rz_0lento

    Joined:
    Oct 8, 2013
    Posts:
    2,361
  6. JofreMP

    JofreMP

    Joined:
    Sep 20, 2019
    Posts:
    8
    Anybody knows if there is a solution for this? I am having the same problem here with the Oculus Quest. The PostProcessing is enabled on the cameras, it renders on the window scene of the editor, but it's placing on the bottom of the Oculus screen.
     
  7. Kevin-VFX

    Kevin-VFX

    Joined:
    Apr 17, 2016
    Posts:
    54
    RHSn likes this.
  8. byronb360

    byronb360

    Joined:
    Nov 23, 2017
    Posts:
    1
    Only add Flare layer script on the center camera.

    upload_2023-10-23_17-36-7.png