Search Unity

Resolved GL.Lines in VR/URP/2020

Discussion in 'VR' started by bzor, May 21, 2021.

  1. bzor

    bzor

    Joined:
    May 28, 2013
    Posts:
    35
    I'm trying to draw a lot of lines in URP/VR in Unity 2020.. Has anyone had any luck drawing GL.Lines in VR? I'm using single pass stereo instanced (Oculus). I'm having trouble getting them to show up in both eyes and have the correct matrix transformation. Any help is much appreciated!
     
  2. bzor

    bzor

    Joined:
    May 28, 2013
    Posts:
    35
    well that was a ridiculous rabbit hole I just went down, trying to draw the lines in VR using .endCameraRendering.. ended up moving the drawing to OnRenderObject() and it all works perfectly.
     
    nukadelic and _geo__ like this.
  3. Justin-Wasilenko

    Justin-Wasilenko

    Joined:
    Mar 10, 2015
    Posts:
    104
    Thanks you for this Black Magic tip!

    I have been struggling with this for the last 2 hours until I found this.