[Glide64] Fix linear texture coordinate transformation

fix taken from
2b29b6c09a
Fixed Zelda OOT rotating "N" is miscolored (HLE)
This commit is contained in:
purplemarshmallow 2016-11-15 14:49:43 +01:00
parent 33c878a220
commit 1b1479c064
1 changed files with 2 additions and 2 deletions

View File

@ -110,8 +110,8 @@ void calc_linear(VERTEX *v)
if (rdp.cur_cache[0]) if (rdp.cur_cache[0])
{ {
// scale >> 6 is size to map to // scale >> 6 is size to map to
v->ou = (acosf(x) / 3.141592654f) * (rdp.tiles[rdp.cur_tile].org_s_scale >> 6); v->ou = (acosf(-x) / 3.141592654f) * (rdp.tiles[rdp.cur_tile].org_s_scale >> 6);
v->ov = (acosf(y) / 3.141592654f) * (rdp.tiles[rdp.cur_tile].org_t_scale >> 6); v->ov = (acosf(-y) / 3.141592654f) * (rdp.tiles[rdp.cur_tile].org_t_scale >> 6);
} }
v->uv_scaled = 1; v->uv_scaled = 1;
WriteTrace(TraceRDP, TraceVerbose, "calc linear u: %f, v: %f", v->ou, v->ov); WriteTrace(TraceRDP, TraceVerbose, "calc linear u: %f, v: %f", v->ou, v->ov);