Use castle for vecmath (doesn't work fully yet)

This commit is contained in:
2026-01-04 17:13:58 +01:00
parent 21c1d2e139
commit fed1e982d2
23 changed files with 424 additions and 1894 deletions

View File

@@ -80,8 +80,8 @@ pub fn init(engine: *Engine, allocator: std.mem.Allocator) !Materials {
.element_offset = Id.empty.toInt(),
.elements = &.{
.{
.base_color = .{ 0, 0, 0 },
.emissive = .{ 1, 0, 1 },
.base_color = .zero,
.emissive = .init(1, 0, 1),
.ior = 1.45,
.metallic = 0,
.normal_scale = 1,
@@ -295,8 +295,8 @@ fn loadMaterial(self: *Materials, engine: *Engine, textures: *Textures, filename
.element_offset = index,
.elements = &.{
.{
.base_color = material_json.baseColor,
.emissive = material_json.emissive,
.base_color = .initArray(material_json.baseColor),
.emissive = .initArray(material_json.emissive),
.ior = material_json.ior,
.metallic = material_json.metallic,
.normal_scale = material_json.normalScale,