mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-09-12 14:01:59 -04:00
parent
066ad6e4d1
commit
b920cea020
@ -185,7 +185,8 @@ pub const Model = struct {
|
|||||||
quad.cornerUV[i] *= @splat(4);
|
quad.cornerUV[i] *= @splat(4);
|
||||||
minUv = @min(minUv, quad.cornerUV[i]);
|
minUv = @min(minUv, quad.cornerUV[i]);
|
||||||
}
|
}
|
||||||
quad.textureSlot = @as(u32, @intFromFloat(@floor(minUv[1]))) * 4 + @as(u32, @intFromFloat(@floor(minUv[0])));
|
minUv = @floor(minUv);
|
||||||
|
quad.textureSlot = @as(u32, @intFromFloat(minUv[1])) * 4 + @as(u32, @intFromFloat(minUv[0]));
|
||||||
|
|
||||||
if (minUv[0] < 0 or minUv[0] > 4 or minUv[1] < 0 or minUv[1] > 4) {
|
if (minUv[0] < 0 or minUv[0] > 4 or minUv[1] < 0 or minUv[1] > 4) {
|
||||||
std.log.err("Uv value for model is outside of 0-1 range", .{});
|
std.log.err("Uv value for model is outside of 0-1 range", .{});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user