     vec3 boxMax = vec3(1.0, 1.0, 1.0);
     float boxT = box(rayOrigin, rayDirection, boxMin, boxMax);
     vec3 boxIntersection = rayOrigin + rayDirection * boxT;
-    float boxDiffuse = diffuse(boxIntersection, light, boxNormal(boxIntersection, boxMin, boxMax));
+    vec3 boxNorm = boxNormal(boxIntersection, boxMin, boxMax);
+    float boxDiffuse = diffuse(boxIntersection, light, boxNorm);
+    float boxSpecular = specular(boxIntersection, light, boxNorm, rayDirection, 30.0);
 
     vec3 sphereCenter = vec3(0.0, 1.0, 0.0);
     float sphereRadius = 1.0;
     float sphereT = sphere(rayOrigin, rayDirection, sphereCenter, sphereRadius);
     vec3 sphereIntersection = rayOrigin + rayDirection * sphereT;
-    float sphereDiffuse = diffuse(sphereIntersection, light, sphereNormal(sphereIntersection, sphereCenter));
+    vec3 sphereNorm = sphereNormal(sphereIntersection, sphereCenter);
+    float sphereDiffuse = diffuse(sphereIntersection, light, sphereNorm);
+    float sphereSpecular = specular(sphereIntersection, light, sphereNorm, rayDirection, 20.0);
 
     vec3 planeCenter = vec3(0.0, 0.0, 0.0);
     vec3 planeNorm = vec3(0.0, 1.0, 0.0);
     float planeT = plane(rayOrigin, rayDirection, planeCenter, planeNorm);
     vec3 planeIntersection = rayOrigin + rayDirection * planeT;
-    float planeDiffuse = diffuse(planeIntersection, light, planeNormal(planeNorm));
+    float planeDiffuse = diffuse(planeIntersection, light, planeNorm);
+    float planeSpecular = specular(planeIntersection, light, planeNorm, rayDirection, 10.0);
 
     float minT = max_distance;
     vec4 color = vec4(0.0, 0.0, 0.0, 1.0);

    return max(0.0, dot(normal, direction));
}

void main() {
    vec3 light = vec3(1.0, 3.0, 2.0);
    vec3 rayOrigin = vEye;

        minT = boxT;
        color.rgb = vec3(0.1, 0.2, 0.3);
        color.rgb += vec3(0.5, 0.5, 0.5) * boxDiffuse;
        color.rgb += vec3(0.5, 0.5, 0.5) * boxSpecular;
    }

    if(min_distance <= sphereT && sphereT <= minT) {
        minT = sphereT;
        color.rgb = vec3(0.3, 0.2, 0.1);
        color.rgb += vec3(0.5, 0.5, 0.5) * sphereDiffuse;
        color.rgb += vec3(0.5, 0.5, 0.5) * sphereSpecular;
    }

    if(min_distance <= planeT && planeT <= minT) {
        minT = planeT;
        color.rgb = vec3(0.1, 0.3, 0.2);
        color.rgb += vec3(0.5, 0.5, 0.5) * planeDiffuse;
        color.rgb += vec3(0.5, 0.5, 0.5) * planeSpecular;
    }

    gl_FragColor = color;
