mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-09 04:51:49 +00:00
feat: process external custom block models for variable textures
This commit is contained in:
parent
43c76c92ff
commit
9a0f6b23b0
4 changed files with 81 additions and 21 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include <cmath>
|
||||
#include <glm/vec2.hpp>
|
||||
#include <glm/vec4.hpp>
|
||||
|
||||
struct UVRegion {
|
||||
float u1;
|
||||
|
|
@ -51,4 +52,11 @@ struct UVRegion {
|
|||
u2 = cx + w * 0.5f * x;
|
||||
v2 = cy + h * 0.5f * y;
|
||||
}
|
||||
|
||||
void set(const glm::vec4& vec) {
|
||||
u1 = vec.x;
|
||||
v1 = vec.y;
|
||||
u2 = vec.z;
|
||||
v2 = vec.w;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue