OBJLoader: MultiMaterial and geometry group support (#8691)
* ObjLoader: Implement support for multiple materials inside a geometry/object. - Tracks material declaration occuring mid face declaration - If object has multiple materials MultiMaterial is creted and geometry groups are created. - This approach is better than splitting into separate objects: 1) we are creating as many objects the file defines (correctness) 2) The full geometry would be duplicated into two objects, afaik this uploads the geometry multiple times to the GPU (perf, i had test asset that had >400 submeshes with 1-6 geometry groups each). Fixes #8681 #8640 Updates #8203 (fixes OPs 2. point) * OBJLoader: Code cleanup and three.js style formatting.
Showing
想要评论请 注册 或 登录