diff options
author | HampusM <hampus@hampusmat.com> | 2023-11-20 22:00:34 +0100 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2023-11-20 22:00:34 +0100 |
commit | b0315b7ebc16fcbae6c3098db6c824f9057d2a71 (patch) | |
tree | c7473fbdbcc59aff933790892ee015a6f05d8565 /engine/fragment-texture.glsl | |
parent | a65c8abcae46b382b2e1bb7cc5d13768325083b4 (diff) |
feat(engine): add materials
Diffstat (limited to 'engine/fragment-texture.glsl')
-rw-r--r-- | engine/fragment-texture.glsl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/engine/fragment-texture.glsl b/engine/fragment-texture.glsl index 2948a2e..69718a6 100644 --- a/engine/fragment-texture.glsl +++ b/engine/fragment-texture.glsl @@ -15,9 +15,9 @@ uniform sampler2D input_texture; 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); |