The left eye will offset reflections to the left and the right eye will do the same for the right. Video below just shows the left eye as that’s how the Quest records things out of the box
Wondering if this is due to the original shader not being compatible with VR or if it’s possible there’s some issue with the cameras’ projectionMatrix?
Strangely this happens on the Quest, but not when using the emulator in stereoscopic mode on my laptop
I verified using Reflector by itself is fine in VR, but using Reflector in Water2 has the issues
@Mugen87 I hope you don’t mind me tagging you as I think you are the author of this shader and I’m unfortunately a little overwhelmed trying to understand it all
Ended up taking this course on shaders by SimonDev and figured it out. Well, not in a necessarily clean fashion. I believe the issue was due to the textureMatrix in Reflection.js using the virtual camera while when trying to reproject it in Water2 we were using the textureMatrix as determined by the actual cameras (each eye). I just ended up making it so the textureMatrix in Reflection could be accessible and then added a uniform referencing that in the Water2 shader. It was quick and dirty, but if I find time I’ll try to get a pull request out with a cleaner solution in the coming weeks
Nice that you found a workaround!
I’ve tried this myself in my WebXR project, however I didn’t have to do a special work-around to fix the horizontal offset issue: