gsdx-hack: remove an extra offset + duplicate linear computing

Initially code aligned texture on pixel boundary + 1/16th. It seems to work without it.
This commit is contained in:
Gregory Hainaut 2015-04-12 17:57:37 +02:00
parent 399ddbd74a
commit 815c99b6e4
1 changed files with 30 additions and 10 deletions

View File

@ -282,22 +282,42 @@ void GSRendererHW::RoundSpriteOffset()
// will be sampled so (t0 - 8) and (t1 - 8 + 16) must be valid.
//
// Minus half for t1 case might be too much
if (linear) {
if (tx0 <= tx1) {
v[i].U = tx0 + half + 1;
v[i+1].U = tx1 - half + 1 + 15;
v[i].U = tx0 + half;
v[i+1].U = tx1 - half + 16;
} else {
v[i].U = tx0 + 15;
v[i+1].U = tx1 + 15 + 16;
}
} else {
if (tx0 <= tx1) {
v[i].U = tx0;
v[i+1].U = tx1 + 16;
} else {
v[i].U = tx0 + 15;
v[i+1].U = tx1 + 15 + 16;
}
}
#endif
#if 1
if (linear) {
if (ty0 <= ty1) {
v[i].V = ty0 + half + 1;
v[i+1].V = ty1 - half + 1 + 15;
v[i].V = ty0 + half;
v[i+1].V = ty1 - half + 16;
} else {
v[i].V = ty0 + 15;
v[i+1].V = ty1 + 15 + 16;
}
} else {
if (ty0 <= ty1) {
v[i].V = ty0;
v[i+1].V = ty1 + 16;
} else {
v[i].V = ty0 + 15;
v[i+1].V = ty1 + 15 + 16;
}
}
#endif
#ifdef DEBUG_U