diff --git a/Lighting.java b/Lighting.java index 02948c8..8edde13 100644 --- a/Lighting.java +++ b/Lighting.java @@ -85,7 +85,7 @@ public class Lighting { double I_diff = Id * kd * Math.cos(normal.dot(l)); /* specular contribution */ - double I_spec = Id * ks * Math.cos(h.dot(normal)); + double I_spec = Id * ks * Math.pow(Math.cos(h.dot(normal)), 2); I += I_diff + I_spec; } catch (InstantiationException ex) {