Search Unity

LineRenderers and TextMesh in URP w/Oculus Quest (Unity 2019.3.6f1)

Discussion in 'VR' started by Danielwbolson, Mar 30, 2020.

  1. Danielwbolson

    Danielwbolson

    Joined:
    Oct 21, 2016
    Posts:
    2
    I am having trouble with LineRenderers and TextMesh components displaying in my Oculus Quest while using URP. Playing in the Editor, they work/look fine. When I run my app in the Oculus Quest, they aren't there however.

    LineRenderer:
    I am using a custom shader for my LineRenderer Material that merely draws a colored line, found below. I am aware of XRLineRenderer but it doesn't seem to support URP based on github issues and forum posts.
    EDIT: Even switching my material to use an Universal Render Pipeline/Unlit shader (practically what I am doing), causes the LineRenderers to be visible when Playing on my laptop, and non-existent on the Quest:
    Code (CSharp):
    1.  
    2. Shader "Unlit/ConstLines"
    3. {
    4.  
    5.     Properties{
    6.         _Color("Main Color (A=Opacity)", Color) = (1,1,1,1)
    7.     }
    8.  
    9.         SubShader{
    10.  
    11.             Tags {
    12.                 "Queue" = "Transparent+2"
    13.                 "IgnoreProjector" = "True"
    14.                 "RenderType" = "Transparent"
    15.                 "RenderPipeline" = "UniversalPipeline"
    16.             }
    17.  
    18.             Pass {
    19.  
    20.             ZWrite Off Lighting OFF
    21.             Blend SrcAlpha OneMinusSrcAlpha
    22.  
    23.             CGPROGRAM
    24.             #pragma vertex vert
    25.             #pragma fragment frag
    26.             #include "UnityCG.cginc"
    27.  
    28.             fixed4 _Color;
    29.  
    30.             struct fragInput {
    31.                 float4 pos : SV_POSITION;
    32.             };
    33.  
    34.             fragInput vert(float4 pos : POSITION) {
    35.                 fragInput o;
    36.  
    37.                 o.pos = UnityObjectToClipPos(pos);
    38.  
    39.                 return o;
    40.             }
    41.  
    42.             fixed4 frag(fragInput v) : SV_Target{
    43.                 return _Color;
    44.             }
    45.  
    46.             ENDCG
    47.             }
    48.     }
    49. }
    TextMesh:
    This uses the 'Gui/3D Text Shader' which most likely isn't URP compliant. So that probably explains why it doesn't show. Does TextMeshPro support URP? I am not sure, based again on forum posts (https://stackoverflow.com/questions/59359507/textmesh-pro-not-compatible-with-lwrp). What approach are people taking to display 3D text in VR URP?

    Thanks for any help. I can provide more information if necessary!
     
    Last edited: Mar 30, 2020
  2. Danielwbolson

    Danielwbolson

    Joined:
    Oct 21, 2016
    Posts:
    2
    False alarm...original developer had absolute paths to the underlying data for our linerenderers and text.
     
    a436t4ataf likes this.