|
Post by michael on Mar 12, 2023 4:38:48 GMT
Here are the ambient/diffuse/specular values I get from my lighting() function for this test: ambient: (0.1, 0.1, 0.1) diffuse: (0.8049844718999243, 0.8049844718999243, 0.8049844718999243) specular: (1.833332378701023e-10, 1.833332378701023e-10, 1.833332378701023e-10)
And here's my Computations: comps: Computations { t: 0.5, object: Object pattern: Solid(Tuple { x: 1.0, y: 1.0, z: 1.0, w: 0.0 }) }, ambient: 0.1, diffuse: 0.9, specular: 0.9, shininess: 200.0, reflective: 0.0, transparency: 0.0, refractive_index: 1.0 }, object: Sphere, shadow_casting: true }, point: Tuple { x: 0.0, y: 0.0, z: 0.5, w: 1.0 }, eyev: Tuple { x: -0.0, y: -0.0, z: -1.0, w: -0.0 }, normalv: Tuple { x: -0.0, y: -0.0, z: -1.0, w: -0.0 }, reflectv: Tuple { x: 0.0, y: 0.0, z: -1.0, w: 0.0 }, inside: true, over_point: Tuple { x: 0.0, y: 0.0, z: 0.49999, w: 1.0 }, under_point: Tuple { x: 0.0, y: 0.0, z: 0.50001, w: 1.0 }, n1: 1.0, n2: 1.0 }
I tried a few things to get the same result as you, but wasn't able to. The fact your other tests are passing makes me think the normal isn't being calculated properly for an inside intersection.
|
|