   need defintions - "point normal" and "tangent vector"
  I am reading through shaderx2 about lighting.It is old as hell, but I am hoping there are some concepts in there to get me past some of these brick walls I am hitting. Anyway, the author provides shader code with very little explanation. Worse, it is in 3_0 and uses some syntax I am not familiar with.It looks like he takes as an input a "tangent" vector, which I assume is provided as part of the vertex structure. What is this tangent vector? Where does it come from? Is my application suppose to compute it somehow? I googled and found tangent space, which I understand as a coordinate system mapping axis to u direction, v direction, and face normal, but I see nothing for a vector called a tangent in his lighting equations.I also went to his references hoping for a better explanation and found a updated paper at http://www.dimension3.sk/publications/masterthesis.phpHe gives an equation:r = 2*( dot(n, L)) * n - LI_specular = cos(a)^shininess = (dot(r, v)^shininessand says that r is a point normal. What is a "point normal" opposed to a face normal? Even with his picture I don't understand what this r variable is.   
  R should be reflection vectorNormalized vector that is in the direction of the Light Vector, rotated around the Normal Vector 180 degrees. Calculated as follows:R = 2(L*N)N-L ;Quote:Original post by XVincentXR should be reflection vectorNormalized vector that is in the direction of the Light Vector, rotated around the Normal Vector 180 degrees. Calculated as follows:R = 2(L*N)N-LAre you sure it is 2(L * N)N - L and not 2(L dot N)N - L?It is hard to tell when reading most papers, because both use the same symbol, only one is larger than the other.   ;Quote:Original post by brekehanAre you sure it is 2(L * N)N - L and not 2(L dot N)N - L?It is hard to tell when reading most papers, because both use the same symbol, only one is larger than the other.It is dot... N dot L is the most common lighting equation..sometimes people write it with a star thinking that context should be enough to indicate what it really means. By the way, a point normal is a single direction vector normalized. Its really the only kind of normal that exists in 3D hardware. A face normal doesnt exist in 3D hardware and is only an approximation based on interpolated point normals.In this equation the r is just a reflection vector...another formulation isR = L - 2 * N * (L•N);  Generally, it'sX * Y = dot(X,Y);XY = X * Y (the normal multiplication)   