Absolute World Position in Material Error? - Unreal + Quest

I’m developing for Quest using Unreal with Vulkan. Project setttings are using mobile settings. No HDR, no post-processing, forward rendering, etc.

I have a material which adds some fake lighting by calculating the distance from a flashlight object which uses a blueprint to pass the position into the material.

This material works correctly on Rift, PSVR and PC-based VR platforms. It does not work correctly on Quest.

What is happening is the light position appears in two different positions depending on the eye. In the left eye it appears that an object is lit but in the right eye it appears that the material is lit as if the object is moved a small distance to the right. This creates a mis-match between the two eyes.

The material uses an Absolute World Position node plus it does a bunch of other calculations for light direction, etc.

I suspect that the Oculus HMD code in Unreal is offsetting the meshes for the right eye differently for Quest than it does for the Rift.

If anyone has experience with this or similar issues related to Quest I would appreciate your help. Thanks!

I managed to fix this. The problem was the flashlight position was not updating for the right eye on the Quest probably due to how it offsets everything for instanced stereo rendering. I used some extra nodes in the material to compensate for the right eye.

Care to share the solution? It would really help :slight_smile:

And just like you I solved it not longer after writing. For anyone looking, the solution for me was to take in the CameraVectorWS multiplied by -1

Hope this helps!