From b0315b7ebc16fcbae6c3098db6c824f9057d2a71 Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 20 Nov 2023 22:00:34 +0100 Subject: feat(engine): add materials --- engine/fragment-color.glsl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'engine/fragment-color.glsl') diff --git a/engine/fragment-color.glsl b/engine/fragment-color.glsl index fcf8d28..4213860 100644 --- a/engine/fragment-color.glsl +++ b/engine/fragment-color.glsl @@ -12,9 +12,9 @@ uniform vec3 view_pos; void main() { - vec3 ambient_light = ambient_light_strength * light_color; + vec3 ambient_light = calc_ambient_light(); - vec3 light_direction = normalize(light_pos - in_frag_pos); + vec3 light_direction = normalize(light.position - in_frag_pos); vec3 norm = normalize(in_normal); vec3 diffuse_light = calc_diffuse_light(light_direction, norm); -- cgit v1.2.3-18-g5258