NEW270465
Vision Pro incorrectly applies gamma in WebXR session
https://bugs.webkit.org/show_bug.cgi?id=270465
Summary Vision Pro incorrectly applies gamma in WebXR session
Nicholas Butko
Reported 2024-03-04 11:31:22 PST
Created attachment 470163 [details] Non-immersive and immersive colors differ with the same shader. When entering a WebXR session on vision pro, the colors appear washed out, and transparent objects are not transparent enough. This can be corrected with code like: `color = pow(color, vec4(2.2, 2.2, 2.2, 2.2))` Note that it's important to correct the alpha channel in addition to the other color channels to get correct results. You can see the effect in the attached screenshots. Before entering a webXR session, the colors look too dark (because of the inverse gamma corretion), but they look correct now in the WebXR view using the same shaders.
Attachments
Non-immersive and immersive colors differ with the same shader. (7.50 MB, image/png)
2024-03-04 11:31 PST, Nicholas Butko
no flags
WebXR video (1.84 MB, image/png)
2024-04-02 09:58 PDT, Daniel Rossi
no flags
WebXR Image (2.78 MB, image/png)
2024-04-02 09:59 PDT, Daniel Rossi
no flags
WebXR sample video (1.37 MB, image/png)
2024-04-02 10:06 PDT, Daniel Rossi
no flags
non-Immersive video (779.44 KB, image/png)
2024-04-02 10:07 PDT, Daniel Rossi
no flags
Nicholas Butko
Comment 1 2024-03-04 11:42:17 PST
You can find public reports of this bug as well: https://discussions.apple.com/thread/255504626?sortBy=best
Radar WebKit Bug Importer
Comment 2 2024-03-04 16:51:47 PST
Daniel Rossi
Comment 3 2024-04-02 09:58:39 PDT
Created attachment 470721 [details] WebXR video
Daniel Rossi
Comment 4 2024-04-02 09:59:05 PDT
Created attachment 470722 [details] WebXR Image
Daniel Rossi
Comment 5 2024-04-02 10:00:41 PDT
Confirming this an issue but in the simulator. With video and image textures. The color gamma changes in WebXR immersive mode. Original thread here https://github.com/mrdoob/three.js/issues/28044 Tests to launch in WebXR to see the problem. In three they call what format is used for the texture "colorspace" with applied srgb. Not sure if that is related what is used for rendering textures. I found the issue also on the webxr sample so unrelated to three. https://threejs.org/examples/?q=video#webxr_vr_video https://threejs.org/examples/?q=pano#webxr_vr_panorama_depth https://immersive-web.github.io/webxr-samples/stereo-video.html
Daniel Rossi
Comment 6 2024-04-02 10:06:56 PDT
Created attachment 470723 [details] WebXR sample video
Daniel Rossi
Comment 7 2024-04-02 10:07:50 PDT
Created attachment 470724 [details] non-Immersive video
Note You need to log in before you can comment on or make changes to this bug.