karansher / computer-graphics-ray-tracing

Computer Graphics Assignment about Ray Tracing
0 stars 0 forks source link

specular shading viewer vector #25

Closed yuetsai93 closed 1 year ago

yuetsai93 commented 1 year ago

When calculating specular shading using h, v and l are involved. I understood how to calculate l, it's basically the direction vector towards the light. But I'm quite confused about how should I get v here. Are we given the viewer's position? Am I missing something here? Thanks in advance. IMG_6AFD73A446C6-1

panuelosj commented 1 year ago

v is the input ray vector, whatever vector is intersecting the surface. This could be the cast vector from the eye, but could also be a reflected vector from another surface.