Closed TrojanFighter closed 5 years ago
In my MakeSphere() I used Vector3d RValue = 2 (ray_normal.dot(LightDirection))ray_normal - LightDirection; double Specular1 = pow(RValue.dot(cameraDirection.light_direction), 10); to calculate Specular value.
The ambient light component should have a much smaller impact than the other two. A weight of 0.1 or 0.2 (out of 1) is usually a good choice. The specular highlight looks indeed strange. Could it be that you forgot to normalize some of your vectors?
Oh I guess this might be right?
It looks I misuse the vector from light source to point as" light direction"
I am moving forward but... My shading attempt felt weird. The left bottom one is the specular one and it has huge colored parts outside the black areas. Also I don’t know what should be the right value range of ambient light(affected the right bottom one), -1 or 1 maybe?