twn_rendering: have triangle uvs represented by floating vectors

This commit is contained in:
2024-10-01 20:52:19 +03:00
parent ba70a566e1
commit 0dc3cf4160
3 changed files with 17 additions and 17 deletions

View File

@ -12,9 +12,9 @@ void unfurl_triangle(const char *path,
Vec3 v0,
Vec3 v1,
Vec3 v2,
Vec2sh uv0,
Vec2sh uv1,
Vec2sh uv2)
Vec2 uv0,
Vec2 uv1,
Vec2 uv2)
{
const TextureKey texture_key = textures_get_key(&ctx.texture_cache, path);
@ -29,9 +29,9 @@ void unfurl_triangle(const char *path,
.v0 = v0,
.v1 = v1,
.v2 = v2,
.uv1 = m_vec2_from(uv1),
.uv0 = m_vec2_from(uv0),
.uv2 = m_vec2_from(uv2),
.uv1 = uv1,
.uv0 = uv0,
.uv2 = uv2,
}};
union UncoloredSpaceTriangle *triangles = (union UncoloredSpaceTriangle *)batch_p->value.primitives;