Uniform colors

This commit is contained in:
2026-02-03 20:31:12 +01:00
parent b80c321e84
commit 4394179a71
6 changed files with 189 additions and 48 deletions

View File

@@ -12,10 +12,12 @@ Material :: struct {
textures: [MATERIAL_MAX_TEXTURES]^Texture,
texture_count: u8,
uniforms: []Uniform,
uv_scale: [2]f32, // TODO: SS - Move?
}
create_material :: proc(program: ^Shader_Program, textures: []^Texture) -> (Material, bool) {
create_material :: proc(program: ^Shader_Program, textures: []^Texture, uniforms: []Uniform) -> (Material, bool) {
m: Material
m.shader_program = program
@@ -39,7 +41,9 @@ create_material :: proc(program: ^Shader_Program, textures: []^Texture) -> (Mate
// TODO: SS - Should we return false here?
}
m.uv_scale = { 2.0, 2.0 } // NOTE: SS - Hardcoded.
m.uniforms = uniforms
m.uv_scale = { 1.0, 1.0 } // NOTE: SS - Hardcoded.
return m, true
}