summaryrefslogtreecommitdiff
path: root/engine/light.glsl
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2024-05-22 19:23:19 +0200
committerHampusM <hampus@hampusmat.com>2024-05-22 19:23:19 +0200
commit0f53ae83a4d8da002850859fe0d010c5df4f2f57 (patch)
tree9dc72bd905ac1e6a5b272a63450b1f0265ac2253 /engine/light.glsl
parentf06880383420da3f8d14079817ff271e71791abb (diff)
refactor(engine): remove ambient color from shader Light struct
Diffstat (limited to 'engine/light.glsl')
-rw-r--r--engine/light.glsl6
1 files changed, 1 insertions, 5 deletions
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)