Search code examples
three.jsaframevirtual-reality

Mirror implemented in A-frame is reflecting a more contrast boosted reflection of the real space


I was creating a virtual room with aframe and to implement the mirror I used Diarmid's code: https://cdn.jsdelivr.net/gh/diarmidmackenzie/aframe-multi-camera@latest/src/mirror.min.js and also tried this user's code too https://github.com/juunini/aframe-mirror/blob/main/aframe-mirror.js. They worked normally but when I put renderer="colorManagement: true" the reflection of my room seen in the mirror had different contrast. I will leave the link to the glitch site below. https://glitch.com/edit/#!/fast-able-paneer?path=index.html%3A22%3A14


Solution

  • I reached out to Diarmid and he resolved the bug. The reason behind the bug was the latest update in the THREE.js library. Here is the link to the branch with the updates which are to be merged to the main branch as of now: https://github.com/diarmidmackenzie/aframe-multi-camera/blob/updated-three-reflector/src/mirror.js

    link to the main branch: https://github.com/diarmidmackenzie/aframe-multi-camera/blob/main/src/mirror.js