diff --git a/app-proto/inversive-display/src/main.rs b/app-proto/inversive-display/src/main.rs index 1937e2b..d2bc742 100644 --- a/app-proto/inversive-display/src/main.rs +++ b/app-proto/inversive-display/src/main.rs @@ -166,10 +166,9 @@ fn main() { // vector with respect to the coordinates of the impact // point. i calculated it in my head and decided that // the result looked good enough for now - vec3 normal_front = normalize(-v.sp + 2.*v.lt.s*pt); + vec3 normal = normalize(-v.sp + 2.*v.lt.s*pt); - vec3 color; - float incidence = dot(normal_front, light_dir); + float incidence = dot(normal, light_dir); float illum = mix(0.4, 1.0, max(incidence, 0.0)); return taggedFrag(vec4(illum * base_color, opacity), -pt.z); }