mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-13 22:27:13 +02:00
change unique ID for material and second tex coord
This commit is contained in:
parent
f9cc82c992
commit
2105f2da92
1 changed files with 10 additions and 0 deletions
|
@ -408,6 +408,16 @@ void FBXBaker::rewriteAndBakeSceneModels() {
|
|||
continue;
|
||||
}
|
||||
|
||||
// we need to modify unique attribute IDs for custom attributes
|
||||
// so the attributes are easily retrievable on the other side
|
||||
if (hasPerFaceMaterials) {
|
||||
dracoMesh->attribute(faceMaterialAttributeID)->set_unique_id(DRACO_ATTRIBUTE_MATERIAL_ID);
|
||||
}
|
||||
|
||||
if (hasTexCoords1) {
|
||||
dracoMesh->attribute(texCoords1AttributeID)->set_unique_id(DRACO_ATTRIBUTE_TEX_COORD_1);
|
||||
}
|
||||
|
||||
draco::Encoder encoder;
|
||||
draco::EncoderBuffer buffer;
|
||||
encoder.EncodeMeshToBuffer(*dracoMesh, &buffer);
|
||||
|
|
Loading…
Reference in a new issue