Remove the per pixel depth option.
Depth calculations are always done in the pixel shader now. Due to the unpredictability of our zcomploc hacks this commit probably changes the behavior of some games which use zcomploc.
This commit is contained in:
parent
876eee5e60
commit
b06f30f845
|
@ -24,7 +24,7 @@
|
|||
// Increment this every time you change shader generation code.
|
||||
enum
|
||||
{
|
||||
LINEAR_DISKCACHE_VER = 6977
|
||||
LINEAR_DISKCACHE_VER = 6978
|
||||
};
|
||||
|
||||
// On disk format:
|
||||
|
|
|
@ -84,7 +84,6 @@ wxString af_desc = wxTRANSLATE("Enable anisotropic filtering.\nEnhances visual q
|
|||
wxString aa_desc = wxTRANSLATE("Reduces the amount of aliasing caused by rasterizing 3D graphics.\nThis makes the rendered picture look less blocky.\nHeavily decreases emulation speed and sometimes causes issues.\n\nIf unsure, select None.");
|
||||
wxString scaled_efb_copy_desc = wxTRANSLATE("Greatly increases quality of textures generated using render to texture effects.\nRaising the internal resolution will improve the effect of this setting.\nSlightly decreases performance and possibly causes issues (although unlikely).\n\nIf unsure, leave this checked.");
|
||||
wxString pixel_lighting_desc = wxTRANSLATE("Calculate lighting of 3D graphics per-pixel rather than per vertex.\nDecreases emulation speed by some percent (depending on your GPU).\nThis usually is a safe enhancement, but might cause issues sometimes.\n\nIf unsure, leave this unchecked.");
|
||||
wxString pixel_depth_desc = wxTRANSLATE("Calculate depth values of 3D graphics per-pixel rather than per vertex.\nIn contrast to pixel lighting (which is merely an enhancement), per-pixel depth calculations are necessary to properly emulate a small number of games.\n\nIf unsure, leave this checked.");
|
||||
wxString force_filtering_desc = wxTRANSLATE("Force texture filtering even if the emulated game explicitly disabled it.\nImproves texture quality slightly but causes glitches in some games.\n\nIf unsure, leave this unchecked.");
|
||||
wxString _3d_vision_desc = wxTRANSLATE("Enable 3D effects via stereoscopy using Nvidia 3D Vision technology if it's supported by your GPU.\nPossibly causes issues.\nRequires fullscreen to work.\n\nIf unsure, leave this unchecked.");
|
||||
wxString internal_res_desc = wxTRANSLATE("Specifies the resolution used to render at. A high resolution will improve visual quality a lot but is also quite heavy on performance and might cause glitches in certain games.\n\"Multiple of 640x528\" is a bit slower than \"Window Size\" but yields less issues. Generally speaking, the lower the internal resolution is, the better your performance will be.\n\nIf unsure, select 640x528.");
|
||||
|
@ -493,7 +492,6 @@ VideoConfigDiag::VideoConfigDiag(wxWindow* parent, const std::string &title, con
|
|||
|
||||
szr_other->Add(CreateCheckBox(page_hacks, _("Cache Display Lists"), wxGetTranslation(dlc_desc), vconfig.bDlistCachingEnable));
|
||||
szr_other->Add(CreateCheckBox(page_hacks, _("Disable Fog"), wxGetTranslation(disable_fog_desc), vconfig.bDisableFog));
|
||||
szr_other->Add(CreateCheckBox(page_hacks, _("Disable Per-Pixel Depth"), wxGetTranslation(pixel_depth_desc), vconfig.bEnablePerPixelDepth, true));
|
||||
szr_other->Add(CreateCheckBox(page_hacks, _("Skip Dest. Alpha Pass"), wxGetTranslation(disable_alphapass_desc), vconfig.bDstAlphaPass));
|
||||
szr_other->Add(CreateCheckBox(page_hacks, _("OpenCL Texture Decoder"), wxGetTranslation(opencl_desc), vconfig.bEnableOpenCL));
|
||||
szr_other->Add(CreateCheckBox(page_hacks, _("OpenMP Texture Decoder"), wxGetTranslation(omp_desc), vconfig.bOMPDecoder));
|
||||
|
|
|
@ -27,7 +27,12 @@
|
|||
#include "VideoConfig.h"
|
||||
#include "NativeVertexFormat.h"
|
||||
|
||||
static int AlphaPreTest();
|
||||
|
||||
#define ALPHATEST_PASS 2
|
||||
#define ALPHATEST_FAIL 1
|
||||
#define ALPHATEST_UNDETERMINED 0
|
||||
|
||||
static unsigned int AlphaPreTest();
|
||||
|
||||
static void StageHash(int stage, u32* out)
|
||||
{
|
||||
|
@ -109,29 +114,17 @@ void GetPixelShaderId(PIXELSHADERUID *uid, DSTALPHA_MODE dstAlphaMode, u32 compo
|
|||
uid->values[0] |= bpmem.genMode.numtexgens << 4; // 4
|
||||
uid->values[0] |= dstAlphaMode << 8; // 2
|
||||
|
||||
bool DepthTextureEnable = (bpmem.ztex2.op != ZTEXTURE_DISABLE && !bpmem.zcontrol.early_ztest && bpmem.zmode.testenable && bpmem.zmode.updateenable) || g_ActiveConfig.bEnablePerPixelDepth;
|
||||
|
||||
uid->values[0] |= DepthTextureEnable << 10; // 1
|
||||
|
||||
bool enablePL = g_ActiveConfig.bEnablePixelLighting && g_ActiveConfig.backend_info.bSupportsPixelLighting;
|
||||
uid->values[0] |= enablePL << 11; // 1
|
||||
uid->values[0] |= enablePL << 10; // 1
|
||||
|
||||
if (!enablePL) uid->values[0] |= xfregs.numTexGen.numTexGens << 12; // 4
|
||||
u32 alphaPreTest = AlphaPreTest()+1;
|
||||
if (!enablePL) uid->values[0] |= xfregs.numTexGen.numTexGens << 11; // 4
|
||||
|
||||
uid->values[0] |= alphaPreTest << 16; // 2
|
||||
|
||||
if (alphaPreTest == 1 || (alphaPreTest && !DepthTextureEnable && dstAlphaMode == DSTALPHA_ALPHA_PASS))
|
||||
{
|
||||
// Courtesy of PreAlphaTest, we're done already ;)
|
||||
// NOTE: The comment header of generated shaders depends on the value of bpmem.genmode.numindstages.. shouldnt really bother about that though.
|
||||
uid->num_values = 1;
|
||||
return;
|
||||
}
|
||||
u32 alphaPreTest = AlphaPreTest();
|
||||
uid->values[0] |= alphaPreTest << 15; // 2
|
||||
|
||||
// numtexgens should be <= 8
|
||||
for (unsigned int i = 0; i < bpmem.genMode.numtexgens; ++i)
|
||||
uid->values[0] |= xfregs.texMtxInfo[i].projection << (18+i); // 1
|
||||
uid->values[0] |= xfregs.texMtxInfo[i].projection << (17+i); // 1
|
||||
|
||||
uid->values[1] = bpmem.genMode.numindstages; // 3
|
||||
u32 indirectStagesUsed = 0;
|
||||
|
@ -164,18 +157,17 @@ void GetPixelShaderId(PIXELSHADERUID *uid, DSTALPHA_MODE dstAlphaMode, u32 compo
|
|||
ptr[0] |= bpmem.alphaFunc.comp1 << 3; // 3
|
||||
ptr[0] |= bpmem.alphaFunc.logic << 6; // 2
|
||||
|
||||
if (alphaPreTest == 0 || alphaPreTest == 2)
|
||||
if (alphaPreTest != ALPHATEST_FAIL)
|
||||
{
|
||||
ptr[0] |= bpmem.fog.c_proj_fsel.fsel << 8; // 3
|
||||
if (DepthTextureEnable)
|
||||
{
|
||||
ptr[0] |= bpmem.ztex2.op << 11; // 2
|
||||
ptr[0] |= bpmem.zcontrol.early_ztest << 13; // 1
|
||||
ptr[0] |= bpmem.zmode.testenable << 14; // 1
|
||||
ptr[0] |= bpmem.zmode.updateenable << 15; // 1
|
||||
}
|
||||
ptr[0] |= bpmem.ztex2.op << 11; // 2
|
||||
// ptr[0] |= bpmem.zcontrol.early_ztest << 13; // 1
|
||||
ptr[0] |= bpmem.zmode.testenable << 14; // 1
|
||||
}
|
||||
|
||||
ptr[0] |= bpmem.zcontrol.early_ztest << 13; // 1
|
||||
ptr[0] |= bpmem.zmode.updateenable << 15; // 1
|
||||
|
||||
if (dstAlphaMode != DSTALPHA_ALPHA_PASS)
|
||||
{
|
||||
if (bpmem.fog.c_proj_fsel.fsel != 0)
|
||||
|
@ -204,9 +196,8 @@ void GetSafePixelShaderId(PIXELSHADERUIDSAFE *uid, DSTALPHA_MODE dstAlphaMode, u
|
|||
*ptr++ = bpmem.ztex2.hex; // 2
|
||||
*ptr++ = bpmem.zcontrol.hex; // 3
|
||||
*ptr++ = bpmem.zmode.hex; // 4
|
||||
*ptr++ = g_ActiveConfig.bEnablePerPixelDepth; // 5
|
||||
*ptr++ = g_ActiveConfig.bEnablePixelLighting && g_ActiveConfig.backend_info.bSupportsPixelLighting; // 6
|
||||
*ptr++ = xfregs.numTexGen.hex; // 7
|
||||
*ptr++ = g_ActiveConfig.bEnablePixelLighting && g_ActiveConfig.backend_info.bSupportsPixelLighting; // 5
|
||||
*ptr++ = xfregs.numTexGen.hex; // 6
|
||||
|
||||
if (g_ActiveConfig.bEnablePixelLighting && g_ActiveConfig.backend_info.bSupportsPixelLighting)
|
||||
{
|
||||
|
@ -218,28 +209,28 @@ void GetSafePixelShaderId(PIXELSHADERUIDSAFE *uid, DSTALPHA_MODE dstAlphaMode, u
|
|||
}
|
||||
|
||||
for (unsigned int i = 0; i < 8; ++i)
|
||||
*ptr++ = xfregs.texMtxInfo[i].hex; // 8-15
|
||||
*ptr++ = xfregs.texMtxInfo[i].hex; // 7-14
|
||||
|
||||
for (unsigned int i = 0; i < 16; ++i)
|
||||
*ptr++ = bpmem.tevind[i].hex; // 16-31
|
||||
*ptr++ = bpmem.tevind[i].hex; // 15-30
|
||||
|
||||
*ptr++ = bpmem.tevindref.hex; // 32
|
||||
*ptr++ = bpmem.tevindref.hex; // 31
|
||||
|
||||
for (int i = 0; i < bpmem.genMode.numtevstages+1; ++i) // up to 16 times
|
||||
{
|
||||
*ptr++ = bpmem.combiners[i].colorC.hex; // 33+5*i
|
||||
*ptr++ = bpmem.combiners[i].alphaC.hex; // 34+5*i
|
||||
*ptr++ = bpmem.tevind[i].hex; // 35+5*i
|
||||
*ptr++ = bpmem.tevksel[i/2].hex; // 36+5*i
|
||||
*ptr++ = bpmem.tevorders[i/2].hex; // 37+5*i
|
||||
*ptr++ = bpmem.combiners[i].colorC.hex; // 32+5*i
|
||||
*ptr++ = bpmem.combiners[i].alphaC.hex; // 33+5*i
|
||||
*ptr++ = bpmem.tevind[i].hex; // 34+5*i
|
||||
*ptr++ = bpmem.tevksel[i/2].hex; // 35+5*i
|
||||
*ptr++ = bpmem.tevorders[i/2].hex; // 36+5*i
|
||||
}
|
||||
|
||||
ptr = &uid->values[113];
|
||||
ptr = &uid->values[112];
|
||||
|
||||
*ptr++ = bpmem.alphaFunc.hex; // 113
|
||||
*ptr++ = bpmem.alphaFunc.hex; // 112
|
||||
|
||||
*ptr++ = bpmem.fog.c_proj_fsel.hex; // 114
|
||||
*ptr++ = bpmem.fogRange.Base.hex; // 115
|
||||
*ptr++ = bpmem.fog.c_proj_fsel.hex; // 113
|
||||
*ptr++ = bpmem.fogRange.Base.hex; // 114
|
||||
|
||||
_assert_((ptr - uid->values) == uid->GetNumValues());
|
||||
}
|
||||
|
@ -481,7 +472,6 @@ static const char *tevIndFmtScale[] = {"255.0f", "31.0f", "15.0f", "7.0f" };
|
|||
static char swapModeTable[4][5];
|
||||
|
||||
static char text[16384];
|
||||
static bool DepthTextureEnable;
|
||||
|
||||
struct RegisterState
|
||||
{
|
||||
|
@ -528,7 +518,6 @@ const char *GeneratePixelShaderCode(DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType
|
|||
nIndirectStagesUsed |= 1 << bpmem.tevind[i].bt;
|
||||
}
|
||||
}
|
||||
DepthTextureEnable = (bpmem.ztex2.op != ZTEXTURE_DISABLE && !bpmem.zcontrol.early_ztest && bpmem.zmode.testenable && bpmem.zmode.updateenable) || g_ActiveConfig.bEnablePerPixelDepth ;
|
||||
// Declare samplers
|
||||
|
||||
if(ApiType != API_D3D11)
|
||||
|
@ -584,14 +573,14 @@ const char *GeneratePixelShaderCode(DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType
|
|||
{
|
||||
WRITE(p, " out float4 ocol0 : COLOR0,%s%s\n in float4 rawpos : %s,\n",
|
||||
dstAlphaMode == DSTALPHA_DUAL_SOURCE_BLEND ? "\n out float4 ocol1 : COLOR1," : "",
|
||||
DepthTextureEnable ? "\n out float depth : DEPTH," : "",
|
||||
"\n out float depth : DEPTH,",
|
||||
ApiType & API_OPENGL ? "WPOS" : ApiType & API_D3D9_SM20 ? "POSITION" : "VPOS");
|
||||
}
|
||||
else
|
||||
{
|
||||
WRITE(p, " out float4 ocol0 : SV_Target0,%s%s\n in float4 rawpos : SV_Position,\n",
|
||||
dstAlphaMode == DSTALPHA_DUAL_SOURCE_BLEND ? "\n out float4 ocol1 : SV_Target1," : "",
|
||||
DepthTextureEnable ? "\n out float depth : SV_Depth," : "");
|
||||
"\n out float depth : SV_Depth,");
|
||||
}
|
||||
|
||||
WRITE(p, " in float4 colors_0 : COLOR0,\n");
|
||||
|
@ -622,32 +611,6 @@ const char *GeneratePixelShaderCode(DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType
|
|||
}
|
||||
WRITE(p, " ) {\n");
|
||||
|
||||
int Pretest = AlphaPreTest();
|
||||
if(Pretest >= 0 && !DepthTextureEnable)
|
||||
{
|
||||
if (!Pretest)
|
||||
{
|
||||
// alpha test will always fail, so restart the shader and just make it an empty function
|
||||
WRITE(p, "ocol0 = 0;\n");
|
||||
if(DepthTextureEnable)
|
||||
WRITE(p, "depth = 1.f;\n");
|
||||
if(dstAlphaMode == DSTALPHA_DUAL_SOURCE_BLEND)
|
||||
WRITE(p, "ocol1 = 0;\n");
|
||||
WRITE(p, "discard;\n");
|
||||
if(ApiType != API_D3D11)
|
||||
WRITE(p, "return;\n");
|
||||
}
|
||||
else if (dstAlphaMode == DSTALPHA_ALPHA_PASS)
|
||||
{
|
||||
WRITE(p, " ocol0 = " I_ALPHA"[0].aaaa;\n");
|
||||
}
|
||||
if(!Pretest || dstAlphaMode == DSTALPHA_ALPHA_PASS)
|
||||
{
|
||||
WRITE(p, "}\n");
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
WRITE(p, " float4 c0 = " I_COLORS"[1], c1 = " I_COLORS"[2], c2 = " I_COLORS"[3], prev = float4(0.0f, 0.0f, 0.0f, 0.0f), textemp = float4(0.0f, 0.0f, 0.0f, 0.0f), rastemp = float4(0.0f, 0.0f, 0.0f, 0.0f), konsttemp = float4(0.0f, 0.0f, 0.0f, 0.0f);\n"
|
||||
" float3 comp16 = float3(1.0f, 255.0f, 0.0f), comp24 = float3(1.0f, 255.0f, 255.0f*255.0f);\n"
|
||||
" float4 alphabump=float4(0.0f,0.0f,0.0f,0.0f);\n"
|
||||
|
@ -755,33 +718,27 @@ const char *GeneratePixelShaderCode(DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType
|
|||
if(RegisterStates[0].AlphaNeedOverflowControl || RegisterStates[0].ColorNeedOverflowControl)
|
||||
WRITE(p, "prev = frac(prev * (255.0f/256.0f)) * (256.0f/255.0f);\n");
|
||||
|
||||
if(Pretest == -1)
|
||||
{
|
||||
// TODO: ALPHATEST_FAIL should be handled by disabling color writes in the render state
|
||||
int Pretest = AlphaPreTest();
|
||||
if (Pretest == ALPHATEST_UNDETERMINED)
|
||||
WriteAlphaTest(p, ApiType, dstAlphaMode);
|
||||
}
|
||||
|
||||
if((bpmem.fog.c_proj_fsel.fsel != 0) || DepthTextureEnable)
|
||||
{
|
||||
// the screen space depth value = far z + (clip z / clip w) * z range
|
||||
WRITE(p, "float zCoord = " I_ZBIAS"[1].x + (clipPos.z / clipPos.w) * " I_ZBIAS"[1].y;\n");
|
||||
}
|
||||
// the screen space depth value = far z + (clip z / clip w) * z range
|
||||
WRITE(p, "float zCoord = " I_ZBIAS"[1].x + (clipPos.z / clipPos.w) * " I_ZBIAS"[1].y;\n");
|
||||
|
||||
if (DepthTextureEnable)
|
||||
// Note: depth textures are disabled if early depth test is enabled
|
||||
if (bpmem.ztex2.op != ZTEXTURE_DISABLE && !bpmem.zcontrol.early_ztest && bpmem.zmode.testenable)
|
||||
{
|
||||
// use the texture input of the last texture stage (textemp), hopefully this has been read and is in correct format...
|
||||
// Note: depth textures are disabled if early depth test is enabled
|
||||
if (bpmem.ztex2.op != ZTEXTURE_DISABLE && !bpmem.zcontrol.early_ztest && bpmem.zmode.testenable)
|
||||
{
|
||||
WRITE(p, "zCoord = dot(" I_ZBIAS"[0].xyzw, textemp.xyzw) + " I_ZBIAS"[1].w %s;\n",
|
||||
(bpmem.ztex2.op == ZTEXTURE_ADD) ? "+ zCoord" : "");
|
||||
WRITE(p, "zCoord = dot(" I_ZBIAS"[0].xyzw, textemp.xyzw) + " I_ZBIAS"[1].w %s;\n",
|
||||
(bpmem.ztex2.op == ZTEXTURE_ADD) ? "+ zCoord" : "");
|
||||
|
||||
// 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");
|
||||
// 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");
|
||||
|
||||
if (dstAlphaMode == DSTALPHA_ALPHA_PASS)
|
||||
WRITE(p, " ocol0 = float4(prev.rgb, " I_ALPHA"[0].a);\n");
|
||||
|
@ -1191,37 +1148,46 @@ static const char *tevAlphaFunclogicTable[] =
|
|||
" != ", // xor
|
||||
" == " // xnor
|
||||
};
|
||||
static int AlphaPreTest()
|
||||
|
||||
static unsigned int AlphaPreTest()
|
||||
{
|
||||
u32 op = bpmem.alphaFunc.logic;
|
||||
u32 comp[2] = {bpmem.alphaFunc.comp0, bpmem.alphaFunc.comp1};
|
||||
u32 comp[2] = { bpmem.alphaFunc.comp0, bpmem.alphaFunc.comp1 };
|
||||
|
||||
// First kill all the simple cases
|
||||
switch(op)
|
||||
{
|
||||
case 0: // AND
|
||||
if (comp[0] == ALPHACMP_ALWAYS && comp[1] == ALPHACMP_ALWAYS) return true;
|
||||
if (comp[0] == ALPHACMP_NEVER || comp[1] == ALPHACMP_NEVER) return false;
|
||||
if (comp[0] == ALPHACMP_ALWAYS && comp[1] == ALPHACMP_ALWAYS)
|
||||
return ALPHATEST_PASS;
|
||||
if (comp[0] == ALPHACMP_NEVER || comp[1] == ALPHACMP_NEVER)
|
||||
return ALPHATEST_FAIL;
|
||||
break;
|
||||
|
||||
case 1: // OR
|
||||
if (comp[0] == ALPHACMP_ALWAYS || comp[1] == ALPHACMP_ALWAYS) return true;
|
||||
if (comp[0] == ALPHACMP_NEVER && comp[1] == ALPHACMP_NEVER)return false;
|
||||
if (comp[0] == ALPHACMP_ALWAYS || comp[1] == ALPHACMP_ALWAYS)
|
||||
return ALPHATEST_PASS;
|
||||
if (comp[0] == ALPHACMP_NEVER && comp[1] == ALPHACMP_NEVER)
|
||||
return ALPHATEST_FAIL;
|
||||
break;
|
||||
|
||||
case 2: // XOR
|
||||
if ((comp[0] == ALPHACMP_ALWAYS && comp[1] == ALPHACMP_NEVER) || (comp[0] == ALPHACMP_NEVER && comp[1] == ALPHACMP_ALWAYS))
|
||||
return true;
|
||||
return ALPHATEST_PASS;
|
||||
if ((comp[0] == ALPHACMP_ALWAYS && comp[1] == ALPHACMP_ALWAYS) || (comp[0] == ALPHACMP_NEVER && comp[1] == ALPHACMP_NEVER))
|
||||
return false;
|
||||
return ALPHATEST_FAIL;
|
||||
break;
|
||||
|
||||
case 3: // XNOR
|
||||
if ((comp[0] == ALPHACMP_ALWAYS && comp[1] == ALPHACMP_NEVER) || (comp[0] == ALPHACMP_NEVER && comp[1] == ALPHACMP_ALWAYS))
|
||||
return false;
|
||||
return ALPHATEST_FAIL;
|
||||
if ((comp[0] == ALPHACMP_ALWAYS && comp[1] == ALPHACMP_ALWAYS) || (comp[0] == ALPHACMP_NEVER && comp[1] == ALPHACMP_NEVER))
|
||||
return true;
|
||||
return ALPHATEST_PASS;
|
||||
break;
|
||||
|
||||
default: PanicAlert("bad logic for alpha test? %08x", op);
|
||||
}
|
||||
return -1;
|
||||
return ALPHATEST_UNDETERMINED;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1248,8 +1214,7 @@ static void WriteAlphaTest(char *&p, API_TYPE ApiType,DSTALPHA_MODE dstAlphaMode
|
|||
WRITE(p, "ocol0 = 0;\n");
|
||||
if (dstAlphaMode == DSTALPHA_DUAL_SOURCE_BLEND)
|
||||
WRITE(p, "ocol1 = 0;\n");
|
||||
if (DepthTextureEnable)
|
||||
WRITE(p, "depth = 1.f;\n");
|
||||
WRITE(p, "depth = 1.f;\n");
|
||||
|
||||
// HAXX: zcomploc is a way to control whether depth test is done before
|
||||
// or after texturing and alpha test. PC GPU does depth test before texturing ONLY if depth value is
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
#define C_PMATERIALS (C_PLIGHTS + 40)
|
||||
#define C_PENVCONST_END (C_PMATERIALS + 4)
|
||||
#define PIXELSHADERUID_MAX_VALUES 70
|
||||
#define PIXELSHADERUID_MAX_VALUES_SAFE 120
|
||||
#define PIXELSHADERUID_MAX_VALUES_SAFE 119
|
||||
|
||||
// DO NOT make anything in this class virtual.
|
||||
template<bool safe>
|
||||
|
|
|
@ -465,6 +465,7 @@ const char *GenerateVertexShaderCode(u32 components, API_TYPE api_type)
|
|||
|
||||
//write the true depth value, if the game uses depth textures pixel shaders will override with the correct values
|
||||
//if not early z culling will improve speed
|
||||
// TODO: Can probably be dropped?
|
||||
if (is_d3d)
|
||||
{
|
||||
WRITE(p, "o.pos.z = " I_DEPTHPARAMS".x * o.pos.w + o.pos.z * " I_DEPTHPARAMS".y;\n");
|
||||
|
|
|
@ -75,7 +75,6 @@ void VideoConfig::Load(const char *ini_file)
|
|||
iniFile.Get("Settings", "AnaglyphStereoSeparation", &iAnaglyphStereoSeparation, 200);
|
||||
iniFile.Get("Settings", "AnaglyphFocalAngle", &iAnaglyphFocalAngle, 0);
|
||||
iniFile.Get("Settings", "EnablePixelLighting", &bEnablePixelLighting, 0);
|
||||
iniFile.Get("Settings", "EnablePerPixelDepth", &bEnablePerPixelDepth, 0);
|
||||
|
||||
iniFile.Get("Settings", "MSAA", &iMultisampleMode, 0);
|
||||
iniFile.Get("Settings", "EFBScale", &iEFBScale, 2); // native
|
||||
|
@ -134,7 +133,6 @@ void VideoConfig::GameIniLoad(const char *ini_file)
|
|||
iniFile.GetIfExists("Video_Settings", "AnaglyphStereoSeparation", &iAnaglyphStereoSeparation);
|
||||
iniFile.GetIfExists("Video_Settings", "AnaglyphFocalAngle", &iAnaglyphFocalAngle);
|
||||
iniFile.GetIfExists("Video_Settings", "EnablePixelLighting", &bEnablePixelLighting);
|
||||
iniFile.GetIfExists("Video_Settings", "EnablePerPixelDepth", &bEnablePerPixelDepth);
|
||||
iniFile.GetIfExists("Video_Settings", "MSAA", &iMultisampleMode);
|
||||
iniFile.GetIfExists("Video_Settings", "EFBScale", &iEFBScale); // integral
|
||||
iniFile.GetIfExists("Video_Settings", "DstAlphaPass", &bDstAlphaPass);
|
||||
|
@ -203,7 +201,6 @@ void VideoConfig::Save(const char *ini_file)
|
|||
iniFile.Set("Settings", "AnaglyphStereoSeparation", iAnaglyphStereoSeparation);
|
||||
iniFile.Set("Settings", "AnaglyphFocalAngle", iAnaglyphFocalAngle);
|
||||
iniFile.Set("Settings", "EnablePixelLighting", bEnablePixelLighting);
|
||||
iniFile.Set("Settings", "EnablePerPixelDepth", bEnablePerPixelDepth);
|
||||
|
||||
|
||||
iniFile.Set("Settings", "ShowEFBCopyRegions", bShowEFBCopyRegions);
|
||||
|
@ -269,7 +266,6 @@ void VideoConfig::GameIniSave(const char* default_ini, const char* game_ini)
|
|||
SET_IF_DIFFERS("Video_Settings", "AnaglyphStereoSeparation", iAnaglyphStereoSeparation);
|
||||
SET_IF_DIFFERS("Video_Settings", "AnaglyphFocalAngle", iAnaglyphFocalAngle);
|
||||
SET_IF_DIFFERS("Video_Settings", "EnablePixelLighting", bEnablePixelLighting);
|
||||
SET_IF_DIFFERS("Video_Settings", "EnablePerPixelDepth", bEnablePerPixelDepth);
|
||||
SET_IF_DIFFERS("Video_Settings", "MSAA", iMultisampleMode);
|
||||
SET_IF_DIFFERS("Video_Settings", "EFBScale", iEFBScale); // integral
|
||||
SET_IF_DIFFERS("Video_Settings", "DstAlphaPass", bDstAlphaPass);
|
||||
|
|
|
@ -133,7 +133,6 @@ struct VideoConfig
|
|||
bool bZTPSpeedHack; // The Legend of Zelda: Twilight Princess
|
||||
bool bUseBBox;
|
||||
bool bEnablePixelLighting;
|
||||
bool bEnablePerPixelDepth;
|
||||
|
||||
int iLog; // CONF_ bits
|
||||
int iSaveTargetId; // TODO: Should be dropped
|
||||
|
|
Loading…
Reference in New Issue