fix uvs in billboards
This commit is contained in:
parent
bbd654a569
commit
fad11041bc
@ -81,10 +81,10 @@ void finally_draw_billboard_batch(struct MeshBatch const *batch,
|
|||||||
const float xr = srcrect.x / dims.w;
|
const float xr = srcrect.x / dims.w;
|
||||||
const float yr = srcrect.y / dims.h;
|
const float yr = srcrect.y / dims.h;
|
||||||
|
|
||||||
const Vec2 uv0 = { xr + wr, yr };
|
const Vec2 uv0 = { xr, yr };
|
||||||
const Vec2 uv1 = { xr + wr, yr + hr };
|
const Vec2 uv1 = { xr, yr + hr };
|
||||||
const Vec2 uv2 = { xr, yr + hr };
|
const Vec2 uv2 = { xr + wr, yr + hr };
|
||||||
const Vec2 uv3 = { xr, yr };
|
const Vec2 uv3 = { xr + wr, yr };
|
||||||
|
|
||||||
for (size_t batch_n = 0; batch_n <= (primitives_len - 1) / QUAD_ELEMENT_BUFFER_LENGTH; batch_n++) {
|
for (size_t batch_n = 0; batch_n <= (primitives_len - 1) / QUAD_ELEMENT_BUFFER_LENGTH; batch_n++) {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user