diff options
author | iurii <[email protected]> | 2024-09-05 20:21:40 +0200 |
---|---|---|
committer | iurii <[email protected]> | 2024-09-05 20:21:40 +0200 |
commit | 4009a194178f1f85bf8936faeca2bf14dcff2c08 (patch) | |
tree | 77008e8d5f538b9058678a4b3e3abd4dfd989867 /src | |
parent | 1a771d9a157bebffad42573d114240a4bfe7f611 (diff) | |
download | funhalla-4009a194178f1f85bf8936faeca2bf14dcff2c08.tar.gz |
materials
Diffstat (limited to '')
-rw-r--r-- | src/main.odin | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main.odin b/src/main.odin index 2b8dd3e..a21a891 100644 --- a/src/main.odin +++ b/src/main.odin @@ -398,10 +398,17 @@ main :: proc() { shader.use(lighting_shader) - object_color := Vec3{1.0, 0.5, 0.31} light_color := Vec3{1.0, 1.0, 1.0} - shader.set_vec3(lighting_shader, cstring("object_color"), &object_color) shader.set_vec3(lighting_shader, cstring("light_color"), &light_color) + + material_ambient := Vec3{1.0, 0.5, 0.31} + material_diffuse := Vec3{1.0, 0.5, 0.31} + material_specular := Vec3{0.5, 0.5, 0.5} + shader.set_vec3(lighting_shader, cstring("material.ambient"), &material_ambient) + shader.set_vec3(lighting_shader, cstring("material.diffuse"), &material_diffuse) + shader.set_vec3(lighting_shader, cstring("material.specular"), &material_specular) + shader.set_f32(lighting_shader, cstring("material.shininess"), 32.0) + shader.set_vec3(lighting_shader, cstring("light_position"), &light_pos) shader.set_vec3(lighting_shader, cstring("view_position"), &camera.position) |