Search Unity

unity_StereoEyeIndex variable not set - instancing init problem?

Discussion in 'AR/VR (XR) Discussion' started by wilberforce, May 5, 2018.

  1. wilberforce

    wilberforce

    Joined:
    Aug 29, 2016
    Posts:
    92
    Hi,

    I am working on a post processing shader that relies on "unity_StereoEyeIndex" variable for VR rendering.

    Problem is when running in Unity 2018 - this variable is not set. I get only one draw call in frame debugger indicating that VR instancing feature might be enabled.

    However, macros UNITY_SETUP_INSTANCE_ID etc. are undefined. Might this be an issue within Unity?

    Shader works fine in Unity 2017.1 and prior.

    Thanks!
     
  2. wilberforce

    wilberforce

    Joined:
    Aug 29, 2016
    Posts:
    92
    UPDATE: I just tested this in Unity 2017.2 which also uses VR instancing and problem does not occur - it is specific for Unity 2018.0 and 2018.1