mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-10 22:49:00 +01:00
Software renderer fix
This commit is contained in:
parent
5a6b876dbd
commit
767f56d7c8
@ -147,14 +147,14 @@ static void TransformTexCoordRegular(const TexMtxInfo& texinfo, int coordNum, bo
|
|||||||
MultiplyVec3Mat34(*src, mat, *dst);
|
MultiplyVec3Mat34(*src, mat, *dst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// normalize
|
||||||
|
const PostMtxInfo& postInfo = xfmem.postMtxInfo[coordNum];
|
||||||
|
const float* postMat = &xfmem.postMatrices[postInfo.index * 4];
|
||||||
|
|
||||||
if (xfmem.dualTexTrans.enabled)
|
if (xfmem.dualTexTrans.enabled)
|
||||||
{
|
{
|
||||||
Vec3 tempCoord;
|
Vec3 tempCoord;
|
||||||
|
|
||||||
// normalize
|
|
||||||
const PostMtxInfo& postInfo = xfmem.postMtxInfo[coordNum];
|
|
||||||
const float* postMat = &xfmem.postMatrices[postInfo.index * 4];
|
|
||||||
|
|
||||||
if (specialCase)
|
if (specialCase)
|
||||||
{
|
{
|
||||||
// no normalization
|
// no normalization
|
||||||
@ -177,6 +177,23 @@ static void TransformTexCoordRegular(const TexMtxInfo& texinfo, int coordNum, bo
|
|||||||
MultiplyVec3Mat34(tempCoord, postMat, *dst);
|
MultiplyVec3Mat34(tempCoord, postMat, *dst);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO write comment
|
||||||
|
if(dst->z == 0.0f)
|
||||||
|
{
|
||||||
|
if(mat[8] != 0.0f || (xfmem.dualTexTrans.enabled && postMat[8] != 0.0f) ||
|
||||||
|
mat[9] != 0.0f || (xfmem.dualTexTrans.enabled && postMat[9] != 0.0f))
|
||||||
|
{
|
||||||
|
// TODO test this case more
|
||||||
|
dst->x = 0.0f;
|
||||||
|
dst->y = 0.0f;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dst->x = MathUtil::Clamp(dst->x / 2.0f, -1.0f, 1.0f);
|
||||||
|
dst->y = MathUtil::Clamp(dst->y / 2.0f, -1.0f, 1.0f);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct LightPointer
|
struct LightPointer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user