Search Unity

Why some divisions with a dot product in formulas are not calculate when implementing.

Discussion in 'Shaders' started by aralambomahay, Jul 12, 2017.

  1. aralambomahay

    aralambomahay

    Joined:
    Apr 12, 2017
    Posts:
    10
    I begin to learn cg shading programming and I try to implement a basic phong model. Within a book that I have, phong model or cook-torrance model, the specular term is divided by some cosine between the light and normal for phond and multiplication of dot(light,normal)xdot(normal,view) for cook-torrance.

    However, when I follow the tutorial from CatLikeCoding.com website (or any code on the web) everyone omits those divisions.
    why?