My situation:
VR-related custom shader. Various tweaks in the vert function to select from an over/under texture to display to each eye, various other behaviors. Shader logic in general is fine. I get what I expect from everything but the following:
This is always true (and obviously shouldn’t be):
if (unity_StereoEyeIndex == 0) {
// Logic
}
This works as expected:
if (unity_CameraProjection[0][2] < 0) {
// Logic
}
Tested with GoogleVR SDK, both Daydream and Cardboard.