From 0f53ae83a4d8da002850859fe0d010c5df4f2f57 Mon Sep 17 00:00:00 2001 From: HampusM Date: Wed, 22 May 2024 19:23:19 +0200 Subject: refactor(engine): remove ambient color from shader Light struct --- engine/light.glsl | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'engine/light.glsl') diff --git a/engine/light.glsl b/engine/light.glsl index 46105e9..49026ec 100644 --- a/engine/light.glsl +++ b/engine/light.glsl @@ -15,8 +15,6 @@ struct Material { struct Light { vec3 position; - - vec3 ambient; vec3 diffuse; vec3 specular; }; @@ -26,9 +24,7 @@ uniform Light light; vec3 calc_ambient_light(in vec2 texture_coords) { - return light.ambient * ( - vec3(texture(material.ambient_map, texture_coords)) * material.ambient - ); + return vec3(texture(material.ambient_map, texture_coords)) * material.ambient; } vec3 calc_diffuse_light(in vec3 light_dir, in vec3 norm, in vec2 texture_coords) -- cgit v1.2.3-18-g5258