In this playground, for example: https://playground.babylonjs.com/#9K3MRA#754
We have a PBR material that is rendered in multiview, but the uniform vEyePosition used to calculate reflections is only derived from the current active camera (which in multiview rendering corresponds to the left eye). In order to get proper reflections when rendering in multiview we should have a second uniform vEyePositionR or a matrix that compensates for the stereo offset between the left & right eyes that we'd multiply by vEyePosition in order to create vEyePositionR in the shader.
In this playground, for example: https://playground.babylonjs.com/#9K3MRA#754 We have a PBR material that is rendered in multiview, but the uniform
vEyePosition
used to calculate reflections is only derived from the current active camera (which in multiview rendering corresponds to the left eye). In order to get proper reflections when rendering in multiview we should have a second uniformvEyePositionR
or a matrix that compensates for the stereo offset between the left & right eyes that we'd multiply byvEyePosition
in order to createvEyePositionR
in the shader.https://github.com/BabylonJS/Babylon.js/blob/4bc7b8000a3a3a94e8701f96087020d71e1df7aa/src/scene.ts#L786-L791
https://github.com/BabylonJS/Babylon.js/blob/4bc7b8000a3a3a94e8701f96087020d71e1df7aa/src/Shaders/ShadersInclude/reflectionFunction.fx#L132