mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-13 00:58:29 +02:00
VideoCommon: Add comment explaining why only the first normal gets normalized
Co-authored-by: Scott Mansell <phiren@gmail.com>
This commit is contained in:
@ -97,6 +97,11 @@ void TransformNormal(const InputVertexData* src, OutputVertexData* dst)
|
||||
MultiplyVec3Mat33(src->normal[0], mat, dst->normal[0]);
|
||||
MultiplyVec3Mat33(src->normal[1], mat, dst->normal[1]);
|
||||
MultiplyVec3Mat33(src->normal[2], mat, dst->normal[2]);
|
||||
// The scale of the transform matrix is used to control the size of the emboss map effect, by
|
||||
// changing the scale of the transformed binormals (which only get used by emboss map texgens).
|
||||
// By normalising the first transformed normal (which is used by lighting calculations and needs
|
||||
// to be unit length), the same transform matrix can do double duty, scaling for emboss mapping,
|
||||
// and not scaling for lighting.
|
||||
dst->normal[0].Normalize();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user