mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
VideoCommon: Handle emboss texgen with only a single normal
Fixes a large number of effects in Rogue Squadron 2 and 3.
This commit is contained in:
@ -90,22 +90,14 @@ void TransformPosition(const InputVertexData* src, OutputVertexData* dst)
|
||||
}
|
||||
}
|
||||
|
||||
void TransformNormal(const InputVertexData* src, bool nbt, OutputVertexData* dst)
|
||||
void TransformNormal(const InputVertexData* src, OutputVertexData* dst)
|
||||
{
|
||||
const float* mat = &xfmem.normalMatrices[(src->posMtx & 31) * 3];
|
||||
|
||||
if (nbt)
|
||||
{
|
||||
MultiplyVec3Mat33(src->normal[0], mat, dst->normal[0]);
|
||||
MultiplyVec3Mat33(src->normal[1], mat, dst->normal[1]);
|
||||
MultiplyVec3Mat33(src->normal[2], mat, dst->normal[2]);
|
||||
dst->normal[0].Normalize();
|
||||
}
|
||||
else
|
||||
{
|
||||
MultiplyVec3Mat33(src->normal[0], mat, dst->normal[0]);
|
||||
dst->normal[0].Normalize();
|
||||
}
|
||||
MultiplyVec3Mat33(src->normal[0], mat, dst->normal[0]);
|
||||
MultiplyVec3Mat33(src->normal[1], mat, dst->normal[1]);
|
||||
MultiplyVec3Mat33(src->normal[2], mat, dst->normal[2]);
|
||||
dst->normal[0].Normalize();
|
||||
}
|
||||
|
||||
static void TransformTexCoordRegular(const TexMtxInfo& texinfo, int coordNum,
|
||||
|
Reference in New Issue
Block a user