Polygon-mode, better shader-compile-error log, material variable 'casts_shadow'

This commit is contained in:
2026-02-04 10:43:22 +01:00
parent 4394179a71
commit efa2c274f3
4 changed files with 49 additions and 7 deletions

View File

@@ -14,10 +14,11 @@ Material :: struct {
uniforms: []Uniform,
casts_shadow: bool,
uv_scale: [2]f32, // TODO: SS - Move?
}
create_material :: proc(program: ^Shader_Program, textures: []^Texture, uniforms: []Uniform) -> (Material, bool) {
create_material :: proc(program: ^Shader_Program, textures: []^Texture, uniforms: []Uniform, casts_shadow: bool) -> (Material, bool) {
m: Material
m.shader_program = program
@@ -43,6 +44,7 @@ create_material :: proc(program: ^Shader_Program, textures: []^Texture, uniforms
m.uniforms = uniforms
m.casts_shadow = casts_shadow
m.uv_scale = { 1.0, 1.0 } // NOTE: SS - Hardcoded.
return m, true