-
-
Couldn't load subscription status.
- Fork 145
Description
Describe the bug
As noticed in mrdoob/three.js#32067 (comment), three-gpu-pathtracer seems to hardcode the UV map that it uses to UV Map zero. For scenes with baked AO, three-gpu-pathtracer ignores baked AO, as it should and only uses the other texture channels during its Material setup.
Geometry may come with multiple UV Maps, as for Baked AO other Mapping strategies are needed. Whilst it's convention to keep the UV Maps for the base material as UVMap 0 and UV Maps for AO as UVMap 1, it may be the other way around. ThreeJS has no issues handling this and no matter what UV Map is used for which texture, it handles it fine. three-gpu-pathtracer on the other hand has issues here and seems to hardcode that it always uses UV Map0 of its textures, even if the texture setup requires UV Map 1.
This breaks materials for assets with UV map 1 for its textures. Setting it the other way around, fixes the issue, as shown in the screenshots below.
Expected behavior
Like ThreeJS, pick the correct UV map, instead of assuming UV map 0 for materials.
Screenshots and Repro Model
Platform:
- Device: [all]
- OS: [all]
- GPU: [all]
- Browser: [all]
- Browser Version: [all]
- Three.js version: [v0.180.0]
- Library version: [v0.0.23]


