EDIT: Hi guys i was trying to get eyeIndex like below in my custom function which is called inside frag shader. But as said it did not work. But when i get the unity_StereoEyeIndex in vertex shader and put it in a custom variable, then use it on frag shader everything worked ok
So if you have that strange behaviour too; get the eyeIndex on vertex shader and pass it to frag via custom param (like “float myEyeIndex” etc) and use it like that.
Hi,
I am getting the unity_StereoEyeIndex always 1 on single pass instanced mode for rift-s for standard pipeline for Unity 2019.3.0f3. Is anyone getting the same issue? Or am i doing something wrong
float eyeIndex = 0;
#if defined(UNITY_STEREO_INSTANCING_ENABLED)
eyeIndex = unity_StereoEyeIndex; //code falls here!!!
#elif defined(UNITY_SINGLE_PASS_STEREO)
eyeIndex = unity_StereoEyeIndex;
#else
…
#endif