VideoCommon: Simplify indirect texture lookup code slightly
This commit is contained in:
parent
aa736bf258
commit
d6517a761c
|
@ -720,8 +720,8 @@ static void WriteStage(T& out, pixel_shader_uid_data* uid_data, int n, API_TYPE
|
|||
out.Write("\tint2 indtevtrans%d = int2(idot(" I_INDTEXMTX"[%d].xyz, iindtevcrd%d), idot(" I_INDTEXMTX"[%d].xyz, iindtevcrd%d)) >> 3;\n", n, mtxidx, n, mtxidx+1, n);
|
||||
|
||||
// TODO: should use a shader uid branch for this for better performance
|
||||
out.Write("\tif (" I_INDTEXMTX"[%d].w >= 0) indtevtrans%d = indtevtrans%d >> " I_INDTEXMTX"[%d].w;\n", mtxidx, n, n, mtxidx);
|
||||
out.Write("\telse indtevtrans%d = indtevtrans%d << (-" I_INDTEXMTX"[%d].w);\n", n, n, mtxidx);
|
||||
out.Write("\tif (" I_INDTEXMTX"[%d].w >= 0) indtevtrans%d >>= " I_INDTEXMTX"[%d].w;\n", mtxidx, n, mtxidx);
|
||||
out.Write("\telse indtevtrans%d <<= (-" I_INDTEXMTX"[%d].w);\n", n, mtxidx);
|
||||
}
|
||||
else if (bpmem.tevind[n].mid <= 7 && bHasTexCoord)
|
||||
{ // s matrix
|
||||
|
@ -731,8 +731,8 @@ static void WriteStage(T& out, pixel_shader_uid_data* uid_data, int n, API_TYPE
|
|||
|
||||
out.Write("\tint2 indtevtrans%d = int2(fixpoint_uv%d * iindtevcrd%d.xx) >> 8;\n", n, texcoord, n);
|
||||
|
||||
out.Write("\tif (" I_INDTEXMTX"[%d].w >= 0) indtevtrans%d = indtevtrans%d >> " I_INDTEXMTX"[%d].w;\n", mtxidx, n, n, mtxidx);
|
||||
out.Write("\telse indtevtrans%d = indtevtrans%d << (-" I_INDTEXMTX"[%d].w);\n", n, n, mtxidx);
|
||||
out.Write("\tif (" I_INDTEXMTX"[%d].w >= 0) indtevtrans%d >>= " I_INDTEXMTX"[%d].w;\n", mtxidx, n, mtxidx);
|
||||
out.Write("\telse indtevtrans%d <<= (-" I_INDTEXMTX"[%d].w);\n", n, mtxidx);
|
||||
}
|
||||
else if (bpmem.tevind[n].mid <= 11 && bHasTexCoord)
|
||||
{ // t matrix
|
||||
|
@ -742,8 +742,8 @@ static void WriteStage(T& out, pixel_shader_uid_data* uid_data, int n, API_TYPE
|
|||
|
||||
out.Write("\tint2 indtevtrans%d = int2(fixpoint_uv%d * iindtevcrd%d.yy) >> 8;\n", n, texcoord, n);
|
||||
|
||||
out.Write("\tif (" I_INDTEXMTX"[%d].w >= 0) indtevtrans%d = indtevtrans%d >> " I_INDTEXMTX"[%d].w;\n", mtxidx, n, n, mtxidx);
|
||||
out.Write("\telse indtevtrans%d = indtevtrans%d << (-" I_INDTEXMTX"[%d].w);\n", n, n, mtxidx);
|
||||
out.Write("\tif (" I_INDTEXMTX"[%d].w >= 0) indtevtrans%d >>= " I_INDTEXMTX"[%d].w;\n", mtxidx, n, mtxidx);
|
||||
out.Write("\telse indtevtrans%d <<= (-" I_INDTEXMTX"[%d].w);\n", n, mtxidx);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue