diff options
author | HampusM <hampus@hampusmat.com> | 2024-05-23 18:50:54 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2024-05-23 18:51:08 +0200 |
commit | 6d53e3b175fbaf379ef8400cdd1efeb725cf4ecd (patch) | |
tree | cbe64ff01e59e3dc9a9cfd8aa2457527d7521ad7 /engine/light.glsl | |
parent | e9504a3b90ef081dcd622381694f6c51e2844c2d (diff) |
style(engine): fix whitespace in shaders
Diffstat (limited to 'engine/light.glsl')
-rw-r--r-- | engine/light.glsl | 31 |
1 files changed, 15 insertions, 16 deletions
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 |