mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-09 09:39:13 +00:00
Fixes Wario World for using an Invalid Texture coordinate, Tell me if it breaks anything
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@852 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
e13ca7e384
commit
41b72ffc8b
2 changed files with 13 additions and 12 deletions
|
@ -606,21 +606,26 @@ void WriteStage(char *&p, int n, u32 texture_mask)
|
|||
int texmap = bpmem.tevorders[n/2].getTexMap(n&1);
|
||||
if(!bHasIndStage) {
|
||||
// calc tevcord
|
||||
//tevcoord.xy = texdim[1].xy * uv1.xy / uv1.z;
|
||||
int OurTexCoord = 0;
|
||||
if(bpmem.genMode.numtexgens)
|
||||
OurTexCoord = texcoord;
|
||||
else
|
||||
OurTexCoord = 0;
|
||||
if( texture_mask & (1<<texmap) ) {
|
||||
// nonpow2
|
||||
if( texfun == XF_TEXPROJ_STQ )
|
||||
WRITE(p,"tevcoord.xy = uv%d.xy / uv%d.z;\n", texcoord, texcoord);
|
||||
WRITE(p,"tevcoord.xy = uv%d.xy / uv%d.z;\n", texcoord, OurTexCoord);
|
||||
else
|
||||
WRITE(p,"tevcoord.xy = uv%d.xy;\n", texcoord);
|
||||
WRITE(p,"tevcoord.xy = uv%d.xy;\n", OurTexCoord);
|
||||
WrapNonPow2Tex(p, "tevcoord", texmap, texture_mask);
|
||||
}
|
||||
else {
|
||||
if( texfun == XF_TEXPROJ_STQ ) {
|
||||
WRITE(p,"tevcoord.xy = "I_TEXDIMS"[%d].xy * uv%d.xy / uv%d.z;\n", texmap, texcoord, texcoord);
|
||||
}
|
||||
else {
|
||||
WRITE(p,"tevcoord.xy = "I_TEXDIMS"[%d].xy * uv%d.xy;\n", texmap, texcoord);
|
||||
}
|
||||
if( texfun == XF_TEXPROJ_STQ )
|
||||
WRITE(p,"tevcoord.xy = "I_TEXDIMS"[%d].xy * uv%d.xy / uv%d.z;\n", texmap, OurTexCoord , OurTexCoord );
|
||||
else
|
||||
WRITE(p,"tevcoord.xy = "I_TEXDIMS"[%d].xy * uv%d.xy;\n", texmap, OurTexCoord);
|
||||
|
||||
}
|
||||
}
|
||||
else if( texture_mask & (1<<texmap) ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue