Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Help Wanted Shader Graph for Android VR - undeclared identifier 'unity_StereoEyeIndex'

Discussion in 'Shader Graph' started by ROBYER1, Oct 21, 2019.

  1. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,088
    Currently using the latest pushes on the SRP repo for the latest versions of Shader Graph and everytime I make a shader, it has this error 'undeclared identifier 'unity_StereoEyeIndex'' and it doesn't actually appear in the built application. We have VR enabled through the new XR Subsystems Management Package and are developing the app for Oculus Quest/Go.

    I have reported this issue with Case 1188487 through the Bug Reporter. It is really hindering our project development and it even affects the assets in the Unity Sample Scene. How does this get past any automated tests on the Scriptable Render Pipeline?!

    Does anyone have a fix for this? We are using Universal Render Pipeline

    upload_2019-10-21_8-28-35.png

    Code (CSharp):
    1. undeclared identifier 'unity_StereoEyeIndex'
    2. Compiling Vertex program with STEREO_INSTANCING_ON _ADDITIONAL_LIGHTS_VERTEX _MIXED_LIGHTING_SUBTRACTIVE
    3. 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_LIGHTMAP_DLDR_ENCODING
     
    hippocoder likes this.
  2. mmvirsabi

    mmvirsabi

    Joined:
    Aug 29, 2019
    Posts:
    4
    I have the exact same issue when using the Unlit master node in ShaderGraph. Any luck resolving it yet?
     
    hippocoder likes this.
  3. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,088
    The developers need to fix it, I am just here shaking the rafters, yelling a lot and getting a bit exhausted from doing it so much. Their testing needs to be more robust as I am so fed up of this stuff.
     
    hippocoder likes this.
  4. YuriyPopov

    YuriyPopov

    Joined:
    Sep 5, 2017
    Posts:
    135
    So any progress on this? I ran into the same issue.
     
    hippocoder likes this.
  5. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,088
    This was fixed in this PR, you can pull the branch it is on. the main issue is that once the StereoEye issue was fixed, I found that a lot of Shader Graph features do not work so well on Android and were not tested (joy). Especially running on the Oculus Quest, things were very broken, that issue is being passed onto someone working in that area.. so will be another few weeks at least until things are stable.

    https://github.com/Unity-Technologies/ScriptableRenderPipeline/pull/4948
     
    hippocoder and mmvirsabi like this.
  6. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    26,897
    undeclared identifier 'unity_StereoEyeIndex' is affecting me too now. I've stopped recommending Unity on an official basis until Unity sorts it. I am pretty embarrassed as I had heavily recommended Unity to people for VR.

    Seems like URP is not capable of it as of 7.1.2 and 7.1.5


    ... yeah that's right. Verified packages don't work. I am glad I'm mature and in control of myself because this is the third time unlucky, where URP + VR has really jumbled my coconuts.

    I bet there's actually little to no automated tests for VR.
     
    Desoxi, ImpossibleRobert and ROBYER1 like this.
  7. ImpossibleRobert

    ImpossibleRobert

    Joined:
    Oct 10, 2013
    Posts:
    359
    Interesting observation: my build is failing the first time I trigger it (2019.3b11, URP, Android) with the error above but when immediately retriggering it, it runs through the second time. Still, a really strange issue and a bit irritating since I would have thought it's a rather obvious one to catch.
     
    ROBYER1 likes this.
  8. ROBYER1

    ROBYER1

    Joined:
    Oct 9, 2015
    Posts:
    1,088
    Read my post earlier in this thread, it was fixed at one point and led to another error after which happens in the build.
     
unityunity