AdaRoseCannon / aframe-xr-boilerplate

Get started quickly with VR and AR using AFrame
https://aframe-xr-starterkit.glitch.me/
MIT License
110 stars 20 forks source link

Allow to specify the Texture channel for the lightmap #22

Closed Elettrotecnica closed 9 months ago

Elettrotecnica commented 9 months ago

Dear maintainers,

newer three.js versions support multiple uv attributes for gltf models. This introduces the need to specify which uv attribute is the one relevant for our lightmap texture.

See e.g. https://github.com/mrdoob/three.js/pull/25721

Without this change, we experience a regression when loading this scene between A-Frame 1.4.2 and 1.5.0 (see picture)

Schermata del 2024-01-12 14-03-27

This code seems to work fine on 1.4.2 and 1.5.0

All the best

Elettrotecnica commented 9 months ago

I note that the default of 1 I have chosen is to make the current model and lightmap behave as expected without change. I understand that in three.js they preferred to go with 0

vincentfretin commented 9 months ago

Thank you very much! The channel option is here in a lightmap component, so that probably make sense channel 1 to be the default, using the second uvmap of the geometry.

vincentfretin commented 9 months ago

@Elettrotecnica I updated the example to aframe 1.5.0 #23 #24 #25 I just tested with the Quest 3, all seems working. If you find any regression, don't hesitate to create an issue or PR.

AdaRoseCannon commented 9 months ago

Thank you both for this :)