mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
Merge branch 'dev' into pathfinding
This commit is contained in:
commit
ca1b761c8c
57 changed files with 818 additions and 207 deletions
|
|
@ -126,7 +126,15 @@ void Batch3D::sprite(
|
|||
float scale = 1.0f / static_cast<float>(atlasRes);
|
||||
float u = (index % atlasRes) * scale;
|
||||
float v = 1.0f - ((index / atlasRes) * scale) - scale;
|
||||
sprite(pos, up, right, w, h, UVRegion(u, v, u+scale, v+scale), tint);
|
||||
sprite(
|
||||
pos + right * w + up * h, // revert centering
|
||||
up,
|
||||
right,
|
||||
w,
|
||||
h,
|
||||
UVRegion(u, v, u + scale, v + scale),
|
||||
tint
|
||||
);
|
||||
}
|
||||
|
||||
void Batch3D::sprite(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue