@Marco13
contentArrow.glb (2.1 KB)
you can find there a simple glb file, it’s impossible to get the attribute vsInput.attributes.TEXCOORD_0 work, or vsInput.attributes.texcoord_0
void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material) {
vec2 uv = fsInput.attributes.texcoord_0;
vec4 baseColor = texture(material.baseColorTexture, uv);
fragOutput.color = baseColor;
}
the json inside :
{
"asset":{
"version":"2.0",
"generator":"GlbWriter"
},
"scenes":[
{
"nodes":[
0
]
}
],
"scene":0,
"nodes":[
{
"mesh":0
}
],
"meshes":[
{
"primitives":[
{
"attributes":{
"POSITION":0,
"TEXCOORD_0":1,
"_CORNEROFFSET":2,
"_DIRECTION":3
},
"mode":4,
"indices":4,
"material":0
}
]
}
],
"images":[
{
"bufferView":2,
"mimeType":"image/png",
"name":"ArrowAtlas"
}
],
"samplers":[
{
"magFilter":9729,
"minFilter":9987,
"wrapS":33071,
"wrapT":33071
}
],
"textures":[
{
"source":0,
"sampler":0
}
],
"materials":[
{
"pbrMetallicRoughness":{
"baseColorTexture":{
"index":0
}
},
"doubleSided":true,
"alphaMode":"BLEND",
"name":"ArrowMaterial"
}
],
"accessors":[
{
"bufferView":0,
"byteOffset":0,
"componentType":5126,
"count":4,
"type":"VEC3",
"min":[
-703854.1875,
3489286,
5288048
],
"max":[
-703854.1875,
3489286,
5288048
]
},
{
"bufferView":0,
"byteOffset":12,
"componentType":5126,
"count":4,
"type":"VEC2"
},
{
"bufferView":0,
"byteOffset":20,
"componentType":5126,
"count":4,
"type":"VEC2"
},
{
"bufferView":0,
"byteOffset":28,
"componentType":5126,
"count":4,
"type":"VEC3"
},
{
"bufferView":1,
"byteOffset":0,
"componentType":5121,
"count":6,
"type":"SCALAR",
"max":[
3
],
"min":[
0
]
}
],
"bufferViews":[
{
"buffer":0,
"byteOffset":692,
"byteLength":160,
"byteStride":40,
"target":34962
},
{
"buffer":0,
"byteOffset":852,
"byteLength":6,
"target":34963
},
{
"buffer":0,
"byteOffset":0,
"byteLength":691
}
],
"buffers":[
{
"byteLength":858
}
]
}