D3D11: Fix glitched polygon edges when MSAA is enabled.
This commit is contained in:
parent
181ac8c910
commit
61c327ba8b
|
@ -668,17 +668,17 @@ const char *GeneratePixelShaderCode(DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType
|
|||
per_pixel_depth ? "\n out float depth : SV_Depth," : "");
|
||||
}
|
||||
|
||||
WRITE(p, " in float4 colors_0 : COLOR0,\n");
|
||||
WRITE(p, " in float4 colors_1 : COLOR1");
|
||||
WRITE(p, " in centroid float4 colors_0 : COLOR0,\n");
|
||||
WRITE(p, " in centroid float4 colors_1 : COLOR1");
|
||||
|
||||
// compute window position if needed because binding semantic WPOS is not widely supported
|
||||
if (numTexgen < 7)
|
||||
{
|
||||
for (int i = 0; i < numTexgen; ++i)
|
||||
WRITE(p, ",\n in float3 uv%d : TEXCOORD%d", i, i);
|
||||
WRITE(p, ",\n in float4 clipPos : TEXCOORD%d", numTexgen);
|
||||
WRITE(p, ",\n in centroid float3 uv%d : TEXCOORD%d", i, i);
|
||||
WRITE(p, ",\n in centroid float4 clipPos : TEXCOORD%d", numTexgen);
|
||||
if(g_ActiveConfig.bEnablePixelLighting && g_ActiveConfig.backend_info.bSupportsPixelLighting)
|
||||
WRITE(p, ",\n in float4 Normal : TEXCOORD%d", numTexgen + 1);
|
||||
WRITE(p, ",\n in centroid float4 Normal : TEXCOORD%d", numTexgen + 1);
|
||||
WRITE(p, " ) {\n");
|
||||
}
|
||||
else
|
||||
|
|
|
@ -136,27 +136,27 @@ char* GenerateVSOutputStruct(char* p, u32 components, API_TYPE ApiType)
|
|||
// GLSL makes this ugly
|
||||
// TODO: Make pretty
|
||||
WRITE(p, "struct VS_OUTPUT {\n");
|
||||
WRITE(p, " float4 pos %s POSITION;\n", ApiType == API_OPENGL ? ";//" : ":");
|
||||
WRITE(p, " float4 colors_0 %s COLOR0;\n", ApiType == API_OPENGL ? ";//" : ":");
|
||||
WRITE(p, " float4 colors_1 %s COLOR1;\n", ApiType == API_OPENGL ? ";//" : ":");
|
||||
WRITE(p, " centroid float4 pos %s POSITION;\n", ApiType == API_OPENGL ? ";//" : ":");
|
||||
WRITE(p, " centroid float4 colors_0 %s COLOR0;\n", ApiType == API_OPENGL ? ";//" : ":");
|
||||
WRITE(p, " centroid float4 colors_1 %s COLOR1;\n", ApiType == API_OPENGL ? ";//" : ":");
|
||||
|
||||
if (xfregs.numTexGen.numTexGens < 7) {
|
||||
for (unsigned int i = 0; i < xfregs.numTexGen.numTexGens; ++i)
|
||||
WRITE(p, " float3 tex%d %s TEXCOORD%d;\n", i, ApiType == API_OPENGL ? ";//" : ":", i);
|
||||
WRITE(p, " float4 clipPos %s TEXCOORD%d;\n", ApiType == API_OPENGL ? ";//" : ":", xfregs.numTexGen.numTexGens);
|
||||
WRITE(p, " centroid float3 tex%d %s TEXCOORD%d;\n", i, ApiType == API_OPENGL ? ";//" : ":", i);
|
||||
WRITE(p, " centroid float4 clipPos %s TEXCOORD%d;\n", ApiType == API_OPENGL ? ";//" : ":", xfregs.numTexGen.numTexGens);
|
||||
if(g_ActiveConfig.bEnablePixelLighting && g_ActiveConfig.backend_info.bSupportsPixelLighting)
|
||||
WRITE(p, " float4 Normal %s TEXCOORD%d;\n", ApiType == API_OPENGL ? ";//" : ":", xfregs.numTexGen.numTexGens + 1);
|
||||
WRITE(p, " centroid float4 Normal %s TEXCOORD%d;\n", ApiType == API_OPENGL ? ";//" : ":", xfregs.numTexGen.numTexGens + 1);
|
||||
} else {
|
||||
// clip position is in w of first 4 texcoords
|
||||
if(g_ActiveConfig.bEnablePixelLighting && g_ActiveConfig.backend_info.bSupportsPixelLighting)
|
||||
{
|
||||
for (int i = 0; i < 8; ++i)
|
||||
WRITE(p, " float4 tex%d %s TEXCOORD%d;\n", i, ApiType == API_OPENGL? ";//" : ":", i);
|
||||
WRITE(p, " centroid float4 tex%d %s TEXCOORD%d;\n", i, ApiType == API_OPENGL? ";//" : ":", i);
|
||||
}
|
||||
else
|
||||
{
|
||||
for (unsigned int i = 0; i < xfregs.numTexGen.numTexGens; ++i)
|
||||
WRITE(p, " float%d tex%d %s TEXCOORD%d;\n", i < 4 ? 4 : 3 , i, ApiType == API_OPENGL ? ";//" : ":", i);
|
||||
WRITE(p, " centroid float%d tex%d %s TEXCOORD%d;\n", i < 4 ? 4 : 3 , i, ApiType == API_OPENGL ? ";//" : ":", i);
|
||||
}
|
||||
}
|
||||
WRITE(p, "};\n");
|
||||
|
|
Loading…
Reference in New Issue