-
Notifications
You must be signed in to change notification settings - Fork 52
Description
First of all, thank you for this great open-source WebRTC implementation for Unity. We were struggling to find a solid way to stream both video and audio from our web application to a VR headset, and your package enabled us to implement a reliable solution for both channels.
Description of the bug
While developing a suite that runs in both VR and the web, we discovered an issue where the received video stream is rendered upside down on the client side.
This issue appears to be platform-dependent. We consistently encountered it on Android-based VR headsets, specifically Meta Quest 3 (and Quest 3S) and Pico G3. Based on our observations, the video seems to be already inverted when streamed, rather than being flipped during Unity’s rendering pipeline.
How to reproduce
1. Stream video from a web application to a Unity-based VR application using WebRTC.
2. Deploy the Unity application to an Android-based VR headset (Meta Quest 3 / Quest 3S or Pico G3).
3. Observe that the received video is rendered upside down on the client.
Fixed version and implementation details
We implemented a fix in our own branch, available here:
https://github.com/devvrelax/client-sdk-unity
The fix uses GPU-based rendering. During rendering, we inspect the pixel data of the rendered image to determine whether the image orientation is correct. If the image is detected as inverted, we apply a vertical flip before displaying it. This approach resolved the issue consistently across the affected devices.
We hope this is helpful, and we’re happy to provide additional details if needed.
Cheers,
Justin and Sido (VRelax dev-team)