mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Revert most stuff from r6517 and revert r6501.
PixelShaderGen changes broke Mario Kart Wii, ClearScreen changes broke Super Mario Sunshine. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6592 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -89,8 +89,7 @@ void CopyEFB(const BPCmd &bp, const EFBRectangle &rc, const u32 &address, const
|
||||
void ClearScreen(const BPCmd &bp, const EFBRectangle &rc)
|
||||
{
|
||||
bool colorEnable = bpmem.blendmode.colorupdate;
|
||||
//bool alphaEnable = (bpmem.zcontrol.pixel_format == PIXELFMT_RGBA6_Z24 && bpmem.blendmode.alphaupdate);
|
||||
bool alphaEnable = bpmem.blendmode.alphaupdate;
|
||||
bool alphaEnable = (bpmem.zcontrol.pixel_format == PIXELFMT_RGBA6_Z24 && bpmem.blendmode.alphaupdate);
|
||||
bool zEnable = bpmem.zmode.updateenable;
|
||||
|
||||
if (colorEnable || alphaEnable || zEnable)
|
||||
|
@ -58,7 +58,7 @@ void GetPixelShaderId(PIXELSHADERUID *uid, DSTALPHA_MODE dstAlphaMode)
|
||||
for (int i = 0; i < 8; i += 2)
|
||||
((u8*)&uid->values[1])[i / 2] = (bpmem.tevksel[i].hex & 0xf) | ((bpmem.tevksel[i + 1].hex & 0xf) << 4);
|
||||
|
||||
u32 enableZTexture = ((bpmem.ztex2.op != ZTEXTURE_DISABLE && !bpmem.zcontrol.zcomploc) || g_ActiveConfig.bEnablePerPixelDepth)? 1 : 0;
|
||||
u32 enableZTexture = (!bpmem.zcontrol.zcomploc && bpmem.zmode.testenable && bpmem.zmode.updateenable)?1:0;
|
||||
|
||||
uid->values[2] = (u32)bpmem.fog.c_proj_fsel.fsel |
|
||||
((u32)bpmem.fog.c_proj_fsel.proj << 3) |
|
||||
@ -466,7 +466,7 @@ const char *GeneratePixelShaderCode(DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType
|
||||
nIndirectStagesUsed |= 1 << bpmem.tevind[i].bt;
|
||||
}
|
||||
}
|
||||
DepthTextureEnable = (bpmem.ztex2.op != ZTEXTURE_DISABLE && !bpmem.zcontrol.zcomploc) || g_ActiveConfig.bEnablePerPixelDepth ;
|
||||
DepthTextureEnable = bpmem.ztex2.op != ZTEXTURE_DISABLE && !bpmem.zcontrol.zcomploc && bpmem.zmode.testenable && bpmem.zmode.updateenable;
|
||||
// Declare samplers
|
||||
|
||||
if(ApiType != API_D3D11)
|
||||
@ -816,18 +816,15 @@ const char *GeneratePixelShaderCode(DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType
|
||||
if (DepthTextureEnable)
|
||||
{
|
||||
// use the texture input of the last texture stage (textemp), hopefully this has been read and is in correct format...
|
||||
if (bpmem.ztex2.op != ZTEXTURE_DISABLE && !bpmem.zcontrol.zcomploc)
|
||||
{
|
||||
if (bpmem.ztex2.op == ZTEXTURE_ADD)
|
||||
WRITE(p, "zCoord = dot("I_ZBIAS"[0].xyzw, textemp.xyzw) + "I_ZBIAS"[1].w + zCoord;\n");
|
||||
else
|
||||
WRITE(p, "zCoord = dot("I_ZBIAS"[0].xyzw, textemp.xyzw) + "I_ZBIAS"[1].w;\n");
|
||||
if (bpmem.ztex2.op == ZTEXTURE_ADD)
|
||||
WRITE(p, "zCoord = dot("I_ZBIAS"[0].xyzw, textemp.xyzw) + "I_ZBIAS"[1].w + zCoord;\n");
|
||||
else
|
||||
WRITE(p, "zCoord = dot("I_ZBIAS"[0].xyzw, textemp.xyzw) + "I_ZBIAS"[1].w;\n");
|
||||
|
||||
// scale to make result from frac correct
|
||||
WRITE(p, "zCoord = zCoord * (16777215.0f/16777216.0f);\n");
|
||||
WRITE(p, "zCoord = frac(zCoord);\n");
|
||||
WRITE(p, "zCoord = zCoord * (16777216.0f/16777215.0f);\n");
|
||||
}
|
||||
// scale to make result from frac correct
|
||||
WRITE(p, "zCoord = zCoord * (16777215.0f/16777216.0f);\n");
|
||||
WRITE(p, "zCoord = frac(zCoord);\n");
|
||||
WRITE(p, "zCoord = zCoord * (16777216.0f/16777215.0f);\n");
|
||||
WRITE(p, "depth = zCoord;\n");
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,6 @@ void VideoConfig::Load(const char *ini_file)
|
||||
iniFile.Get("Settings", "AnaglyphStereoSeparation", &iAnaglyphStereoSeparation, 200);
|
||||
iniFile.Get("Settings", "AnaglyphFocalAngle", &iAnaglyphFocalAngle, 0);
|
||||
iniFile.Get("Settings", "EnablePixelLigting", &bEnablePixelLigting, 0);
|
||||
iniFile.Get("Settings", "EnablePerPixelDepth", &bEnablePerPixelDepth, 0);
|
||||
|
||||
iniFile.Get("Settings", "ShowShaderErrors", &bShowShaderErrors, 0);
|
||||
iniFile.Get("Settings", "MSAA", &iMultisampleMode, 0);
|
||||
@ -194,8 +193,6 @@ void VideoConfig::Save(const char *ini_file)
|
||||
iniFile.Set("Settings", "AnaglyphStereoSeparation", iAnaglyphStereoSeparation);
|
||||
iniFile.Set("Settings", "AnaglyphFocalAngle", iAnaglyphFocalAngle);
|
||||
iniFile.Set("Settings", "EnablePixelLigting", bEnablePixelLigting);
|
||||
iniFile.Set("Settings", "EnablePerPixelDepth", bEnablePerPixelDepth);
|
||||
|
||||
|
||||
iniFile.Set("Settings", "ShowEFBCopyRegions", bShowEFBCopyRegions);
|
||||
iniFile.Set("Settings", "ShowShaderErrors", bShowShaderErrors);
|
||||
|
@ -131,7 +131,6 @@ struct VideoConfig
|
||||
float fAspectRatioHackW, fAspectRatioHackH;
|
||||
bool bZTPSpeedHack; // The Legend of Zelda: Twilight Princess
|
||||
bool bEnablePixelLigting;
|
||||
bool bEnablePerPixelDepth;
|
||||
|
||||
int iLog; // CONF_ bits
|
||||
int iSaveTargetId;
|
||||
|
Reference in New Issue
Block a user