Article directory
Preface
Dot product of vectors used by Shader in Unity
1. Multiplication of vectors
1. Dot product
2. Difference product
2. Dot product (the result is a scalar)
1. Mathematical representation
2. Geometric representation
One sentence summary: Dot product of two vectors = Projection value of one vector on the other vector * Modulus length of the other vector
Note: The dot product of vectors is mainly used in lighting models
3. Cross product
1. The result of the vector cross product is perpendicular to the two multiplied vectors.
2. Method to judge the positive and negative direction of the result: right-hand rule
The index finger points to the first vector, the middle finger points to the second vector, and the thumb is the direction of the result vector.