OpenGL - How to calculate normals in a terrain height grid?
问题 My approach is to calculate two tangent vectors parallel to axis X and Y respectively. Then calculate the cross product to find the normal vector. The tangent vector is given by the line that crosses the middle point on the two nearest segments as is shown in the following picture. I was wondering whether there is a more direct calculation, or less expensive in terms of CPU cycles. 回答1: You can actually calculate it without a cross product, by using the "finite difference method" (or at least