Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mirrors are looking dark in A-Frame 1.5.0 with color management enabled. #8

Open
diarmidmackenzie opened this issue Dec 17, 2023 · 2 comments

Comments

@diarmidmackenzie
Copy link
Owner

diarmidmackenzie commented Dec 17, 2023

A-Frame 1.5.0 has enabled color management by default

See: aframevr/aframe#5383 and aframevr/aframe#5210

On upgrading the mirror example to 1.5.0 I noticed everything got very dark.

Setting renderer=colorManagement: false got us back to the original display.

However, ideally mirrors should work with colorManagement enabled, especially as this is the default from 1.5.0.

I have created a test page with a mirror, and colorManagement enabled. With 1.4.2 the reflections are noticeably darker, but not too bad. WIth 1.5.0, they are much darker still. Back in 1.2.0 the reflections weren't darkened at all.

Some pics (all with color management enabled):

1.5.0
image

1.4.2
image

1.3.0 (looks the same as 1.4.2 to me)
image

1.2.0
image

@diarmidmackenzie
Copy link
Owner Author

Obvious first thing to try was moving to the latest THREE.js code from Reflector.js

Done that in a branch here:
https://github.com/diarmidmackenzie/aframe-multi-camera/tree/update-mirror-to-three-r158

With that change, reflections with 1.5.0 and color management enabled do seem a little less dark.
image

But more significantly there's a massive perf degradation - the mirror example was running at < 3fps on the latest code, vs. about 15fps with the previous code.

Possible match on this issue:
mrdoob/three.js#19248

Is so, there's presumably an encoding mismatch somewhere, leading to the perf degradation... I don't have time to dig into this at the moment.

@diarmidmackenzie
Copy link
Owner Author

diarmidmackenzie commented Dec 17, 2023

Based on comment here I discovered that if I remove the color attribute from my mirrors, the performance degradation disappears.

The 'color' attribute had been intended to color the back side of the mirror, so some work needed to color the back correctly without affecting performance of the mirror front.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant