mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
fix: incorrect UV on custom model blocks
This commit is contained in:
parent
0ccfc2d3a0
commit
12105c2933
3 changed files with 4 additions and 7 deletions
|
|
@ -13,6 +13,9 @@ util::TextureRegion util::get_texture_region(
|
|||
} else {
|
||||
auto atlas = assets.get<Atlas>(name.substr(0, sep));
|
||||
if (atlas) {
|
||||
if (sep == name.length() - 1) {
|
||||
return {atlas->getTexture(), UVRegion(0,0,1,1)};
|
||||
}
|
||||
if (auto reg = atlas->getIf(name.substr(sep+1))) {
|
||||
return {atlas->getTexture(), *reg};
|
||||
} else if (!fallback.empty()){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue