From 6d53e3b175fbaf379ef8400cdd1efeb725cf4ecd Mon Sep 17 00:00:00 2001 From: HampusM Date: Thu, 23 May 2024 18:50:54 +0200 Subject: style(engine): fix whitespace in shaders --- engine/light.glsl | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) (limited to 'engine/light.glsl') diff --git a/engine/light.glsl b/engine/light.glsl index 7516a58..6bc730a 100644 --- a/engine/light.glsl +++ b/engine/light.glsl @@ -4,23 +4,23 @@ #define LIGHT_GLSL struct Material { - vec3 ambient; - vec3 diffuse; - vec3 specular; - sampler2D ambient_map; - sampler2D diffuse_map; - sampler2D specular_map; - float shininess; -}; + vec3 ambient; + vec3 diffuse; + vec3 specular; + sampler2D ambient_map; + sampler2D diffuse_map; + sampler2D specular_map; + float shininess; +}; struct PointLight { vec3 position; - vec3 diffuse; - vec3 specular; - float constant; - float linear; - float quadratic; -}; + vec3 diffuse; + vec3 specular; + float constant; + float linear; + float quadratic; +}; vec3 calc_ambient_light(in Material material, in vec2 texture_coords) { @@ -55,7 +55,7 @@ vec3 calc_specular_light( vec3 view_direction = normalize(view_pos - frag_pos); vec3 reflect_direction = reflect(-light_dir, norm); - + float spec = pow(max(dot(view_direction, reflect_direction), 0.0), material.shininess); @@ -111,5 +111,4 @@ vec3 calc_point_light( return diffuse_light + specular_light; } - #endif -- cgit v1.2.3-18-g5258