mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 16:25:42 +00:00
export rounds LODs to the nearest power of 2
prevent submeshes from flickering in and out due to lod mismatches when exporting groups to a singularr model file
This commit is contained in:
parent
341c7eeee1
commit
afd836cc56
2 changed files with 3 additions and 2 deletions
|
|
@ -889,7 +889,8 @@ bool ConvexShape::buildExportPolyList(ColladaUtils::ExportData* exportData, cons
|
||||||
ColladaUtils::ExportData::detailLevel* curDetail = &meshData->meshDetailLevels.last();
|
ColladaUtils::ExportData::detailLevel* curDetail = &meshData->meshDetailLevels.last();
|
||||||
|
|
||||||
//Make sure we denote the size this detail level has
|
//Make sure we denote the size this detail level has
|
||||||
curDetail->size = 512;
|
curDetail->size = getNextPow2(getObjBox().len());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
|
|
@ -1363,7 +1363,7 @@ bool TSStatic::buildExportPolyList(ColladaUtils::ExportData* exportData, const B
|
||||||
ColladaUtils::ExportData::detailLevel* curDetail = &meshData->meshDetailLevels.last();
|
ColladaUtils::ExportData::detailLevel* curDetail = &meshData->meshDetailLevels.last();
|
||||||
|
|
||||||
//Make sure we denote the size this detail level has
|
//Make sure we denote the size this detail level has
|
||||||
curDetail->size = detail.size;
|
curDetail->size = getNextPow2(detail.size);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue