Search Unity

Errors when compiling VFX graph in XR/Android not when running in editor.

Discussion in 'AR/VR (XR) Discussion' started by alexchesser, Feb 1, 2020.

  1. alexchesser

    alexchesser

    Joined:
    Sep 15, 2017
    Posts:
    147
    Hey,

    I'm not sure if this is a bug, known issue or something that is currently not supported, but I've just tried putting my first VFX graph into an XR build for oculus quest.

    There are two error messages that come up that I'm trying to read, but maybe someone has an idea of what is going on here?

    Code (CSharp):
    1. Shader error in 'Hidden/VFX/Pain/System 1/Output Particle Quad': invalid subscript 'stereoTargetEyeIndex' at /Program Files/Unity/Hub/Editor/2019.3.0f5/Editor/Data/CGIncludes/UnityCG.cginc(786) (on gles3)
    2.  
    3. Compiling Vertex program with UNITY_PASS_FORWARDBASE STEREO_MULTIVIEW_ON
    4. Platform defines: UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_NO_CUBEMAP_ARRAY UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF2 SHADER_API_MOBILE UNITY_HARDWARE_TIER3 UNITY_COLORSPACE_GAMMA UNITY_LIGHTMAP_DLDR_ENCODING
    5.  
    Code (CSharp):
    1. Shader error in 'Hidden/VFX/Pain/System 1/Output Particle Quad': invalid subscript 'stereoTargetEyeIndexSV' at /Program Files/Unity/Hub/Editor/2019.3.0f5/Editor/Data/CGIncludes/UnityCG.cginc(786) (on gles3)
    2.  
    3. Compiling Vertex program with UNITY_PASS_FORWARDBASE STEREO_INSTANCING_ON
    4. Platform defines: UNITY_NO_DXT5nm UNITY_NO_RGBM UNITY_ENABLE_REFLECTION_BUFFERS UNITY_FRAMEBUFFER_FETCH_AVAILABLE UNITY_NO_CUBEMAP_ARRAY UNITY_NO_SCREENSPACE_SHADOWS UNITY_PBS_USE_BRDF3 UNITY_NO_FULL_STANDARD_SHADER SHADER_API_MOBILE UNITY_HARDWARE_TIER1 UNITY_COLORSPACE_GAMMA UNITY_LIGHTMAP_DLDR_ENCODING
    5.  
    maybe there's a simple checkbox somewhere, maybe I have to update my render pipeline at the same time I add my VFX graph package?

    Has anyone else managed to get vfx graph working with a VR build? If this doesn't work out I'm giong to try doing something with shader-graph which I hope doesn't have the same problem.

    Any input or advice is welcome. I think I'll report a bug just in case.
     
  2. alexchesser

    alexchesser

    Joined:
    Sep 15, 2017
    Posts:
    147
    update - looks like it was just a case of not installing the URP (universal render pipeline) package alongside the VFX graph package. User error.
     
  3. olejuer

    olejuer

    Joined:
    Dec 1, 2014
    Posts:
    211
    I had the same error and it would go away by saving with ctrl+s in the effects graph before compiling