diff options
Diffstat (limited to 'engine/fragment-texture.glsl')
-rw-r--r-- | engine/fragment-texture.glsl | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/engine/fragment-texture.glsl b/engine/fragment-texture.glsl deleted file mode 100644 index 69718a6..0000000 --- a/engine/fragment-texture.glsl +++ /dev/null @@ -1,31 +0,0 @@ -#version 330 core - -#preinclude "light.glsl" - -out vec4 FragColor; - -in vec2 in_texture_coords; - -in vec3 in_frag_pos; -in vec3 in_normal; - -uniform vec3 view_pos; - -uniform sampler2D input_texture; - -void main() -{ - vec3 ambient_light = calc_ambient_light(); - - vec3 light_direction = normalize(light.position - in_frag_pos); - vec3 norm = normalize(in_normal); - - vec3 diffuse_light = calc_diffuse_light(light_direction, norm); - - vec3 specular_light = - calc_specular_light(light_direction, norm, view_pos, in_frag_pos); - - vec4 light = vec4((ambient_light + diffuse_light + specular_light), 1.0); - - FragColor = light * texture(input_texture, in_texture_coords); -} |