„Számítógépes grafika házi feladat tutorial” változatai közötti eltérés

Rohamcsiga (vitalap | szerkesztései)
Rohamcsiga (vitalap | szerkesztései)
1 125. sor: 1 125. sor:
   
   
<br/> <syntaxhighlight lang="c">  
<br/> <syntaxhighlight lang="c">  
Vector L = light.dir.normalize(), V = -inter.ray.direction;
Vector L = light.dir.normalize(), V = (camera.pos-inter.pos).normalize();
Vector H = (L + V).normalize(), N = inter.normal;
Vector H = (L + V).normalize(), N = inter.normal;
float specular_power = pow(max(dot(H, N), 0.0f), shininess);
float specular_power = pow(max(dot(H, N), 0.0f), shininess);