- Home /
ZTesting on certain steamVR games causes right eye to not display material correctly
I'm porting some mod tools I made a while ago to a VR game and noticed that some of my shaders that use ZTesting cause affected objects to display incorrectly only on the right eye.
I'm not entirely sure whats happening and it seems to be drawing the left eyes image of that object on the right eye also, I've tried using generic code found online to see if it was my shaders personally but all have the same issue.
The weirder part is I have no idea whats causing this, not all games that I have tested this on have it happen, I thought that it might be to do with valves Lab Renderer due to it happening in The Lab but I can't replicate it in my own editor/testbed
It is hard to show this with an image so I made an extreme example so I made a quick video
https://gfycat.com/QuestionableScaredHarrierhawk
As you can see it isnt correctly rendering.
The only solution I can think of would be to find out what camera (eye) is currently rendering and force it to use the correct eyes position when it renders. I am however not well versed in shader creation so I can't for the life of me figure this out.