aframe icon indicating copy to clipboard operation
aframe copied to clipboard

Apple Vision Pro washed out / lighter colors

Open dmarcos opened this issue 1 year ago • 10 comments
trafficstars

Might be gamma issues. Can test with any of the A-Frame examples and compare with Meta Browser.

dmarcos avatar Feb 03 '24 21:02 dmarcos

Additional context https://twitter.com/Cody_J_Bennett/status/1753882034588537117

dmarcos avatar Feb 03 '24 21:02 dmarcos

This is annoying. In theory all we'd have to do is set outputEncoding = THREE.LinearSRGBColorSpace on the WebXR render target. However, this isn't the case for all pre-existing supported devices, meaning:

  • A check is needed to determine if the device is an AVP or not, and depending on it set the output encoding
  • Shaders like the ones in aframe-environment-component won't output the correct colours on AVP (= requires changes)
  • Projects that require colorManagement: false will have incorrect colours on AVP
  • Projects stuck/still on older A-Frame versions will have incorrect colours on AVP

Not to mention, that if Apple changes it to be in line with the other implementations (or vice versa), any workarounds already in place will instead cause incorrect colours. Not sure what the best approach going forward is, but since WebXR is still behind a flag on AVP, I think an opt-in property or something would be safest, until it's clear if this behaviour is intended or not.

mrxz avatar Feb 04 '24 09:02 mrxz

Seems might be due to Vision Pro displays being p3. Might need some spec work. Found relevant convo.

dmarcos avatar Feb 04 '24 20:02 dmarcos

Short term hack might be necessary:

A check is needed to determine if the device is an AVP or not, and depending on it set the output encoding

dmarcos avatar Feb 04 '24 20:02 dmarcos

@dmarcos any updates on a fix for this? I had tried manually adding a gamma correction in a shader and it helped a little but wasn't great :s It's making our splats look sad in https://github.com/mkkellogg/GaussianSplats3D

@mkkellogg FYI

dlazares avatar Mar 15 '24 06:03 dlazares

@dlazares This has to be fixed at the Safari / WebXR spec level not A-Frame

dmarcos avatar Mar 15 '24 14:03 dmarcos

thanks @dmarcos, tracking is here https://bugs.webkit.org/show_bug.cgi?id=270465 and also a short-term hack described in it as well.

dlazares avatar Mar 15 '24 17:03 dlazares

Thanks. I've been told Apple team is aware of it and working on it. I think timeline depends whether it requires modifying the WebXR spec or not.

dmarcos avatar Mar 15 '24 18:03 dmarcos

Testing again, this seems fully resolved on the latest visionOS 2.0 Beta / Safari 18 Beta.

mkeblx avatar Jun 11 '24 15:06 mkeblx

Nice! Thanks so much for testing

dmarcos avatar Jun 11 '24 16:06 dmarcos