How to use vertexData.uvs2?

I assume, I could have a texture file as a texture map, one part used by vertexData.uvs and another by vertexData.uvs2. If the other part has alpha transparent areas, the first part should get visible.
Correct?
It’s not new in 5.0, is it?

It doesn’t work with my code.
Behind the transparent parts it’s just the background color (test with one mesh only).

And I can’t find a playground, using uvs2.

++++

Loading this gltf, uvs2 looks good, so it must be my fould?

(But the geometry looks odd!)

I will try to make a PG … there it is:

Not sure about your problem, but uvs2 is a set of alternate texture coordinates that can be swapped in by setting coordinatesIndex = 1 on a Texture. I’ve used this to assign the UVs to a lightmap texture, while also having a diffuse texture that used the uvs (and the default coordinatesIndex of zero).

3 Likes

Ah yes, this way it is ok, but not what I am looking for.
I expected, both UV sets are used and rendered on top of each other, as the GLTF loader seems to do it. But may be, the gltf model just uses two sets of vertices and indices, like this:

Or is there a way to skip the double sets and just use UV2? It should be possible with a special shader, shouldn’t it?