diff --git a/src/game.zig b/src/game.zig index ebb0ccb..85b1fe2 100644 --- a/src/game.zig +++ b/src/game.zig @@ -275,10 +275,10 @@ export fn game_init(global_allocator: *std.mem.Allocator) void { } } - const scene = globals.g_mem.world.createScene(globals.g_assetman.resolveScene(a.Scenes.scifi_helmet.SciFiHelmet.scene)); + const scene = globals.g_mem.world.createScene(globals.g_assetman.resolveScene(a.Scenes.amd_ryzen_9.scene)); const ent = globals.g_mem.world.getEntity(scene) orelse @panic("WTF"); ent.data.transform.pos = Vec3.new(0, 1, 0); - // ent.data.transform.scale = Vec3.one().scale(4); + ent.data.transform.scale = Vec3.one().scale(0.2); } export fn game_update() bool { diff --git a/tools/asset_compiler.zig b/tools/asset_compiler.zig index 8bed9d3..98eac85 100644 --- a/tools/asset_compiler.zig +++ b/tools/asset_compiler.zig @@ -552,13 +552,18 @@ fn processTextureFromFile(allocator: std.mem.Allocator, input: []const u8, outpu /// Using naming conventions fn guessTextureTypeFromName(name: []const u8) TextureType { const stem = std.fs.path.stem(name); - const sub_ext = std.fs.path.extension(stem); + var buf: [std.fs.MAX_NAME_BYTES]u8 = undefined; + const lower_stem = std.ascii.lowerString(&buf, stem); + const sub_ext = std.fs.path.extension(lower_stem); if (std.mem.eql(u8, sub_ext, ".norm")) { return .Normal; } - if (std.mem.endsWith(u8, stem, "Normal")) { + if (std.mem.endsWith(u8, lower_stem, "normal")) { return .Normal; } + if (std.mem.endsWith(u8, lower_stem, "metallicroughness")) { + return .MetallicRoughness; + } return .Color; } @@ -566,6 +571,7 @@ fn guessTextureTypeFromName(name: []const u8) TextureType { const TextureType = enum { Color, Normal, + MetallicRoughness, HDR, };