diff options
author | iurii <[email protected]> | 2024-09-05 18:07:25 +0200 |
---|---|---|
committer | iurii <[email protected]> | 2024-09-05 18:07:25 +0200 |
commit | 1a771d9a157bebffad42573d114240a4bfe7f611 (patch) | |
tree | 53c9d496a034502458f0ab51d2de97991f0c0225 /src | |
parent | 1e34058ac8c5929e9dedb544b9a1c84a6c13435a (diff) | |
download | funhalla-1a771d9a157bebffad42573d114240a4bfe7f611.tar.gz |
fixed specular
Diffstat (limited to 'src')
-rw-r--r-- | src/main.odin | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main.odin b/src/main.odin index bb4803e..2b8dd3e 100644 --- a/src/main.odin +++ b/src/main.odin @@ -403,6 +403,7 @@ main :: proc() { shader.set_vec3(lighting_shader, cstring("object_color"), &object_color) shader.set_vec3(lighting_shader, cstring("light_color"), &light_color) shader.set_vec3(lighting_shader, cstring("light_position"), &light_pos) + shader.set_vec3(lighting_shader, cstring("view_position"), &camera.position) aspect: f32 = 800.0 / 600.0 projection := linalg.matrix4_perspective_f32( @@ -426,6 +427,7 @@ main :: proc() { gl.BindVertexArray(cube_vao) gl.DrawArrays(gl.TRIANGLES, 0, 36) + // lamp cube object drawing shader.use(light_cube_shader) shader.set_mat4(light_cube_shader, cstring("projection"), &projection) shader.set_mat4(light_cube_shader, cstring("view"), &view) |