mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 05:40:01 -06:00
Missed a write to depth before discard in PreAlphaTest
This commit is contained in:
@ -782,10 +782,17 @@ const char *GeneratePixelShaderCode(DSTALPHA_MODE dstAlphaMode, API_TYPE ApiType
|
|||||||
{
|
{
|
||||||
// alpha test will always fail, so restart the shader and just make it an empty function
|
// alpha test will always fail, so restart the shader and just make it an empty function
|
||||||
WRITE(p, "\tocol0 = float4(0.0f);\n");
|
WRITE(p, "\tocol0 = float4(0.0f);\n");
|
||||||
|
if(DepthTextureEnable)
|
||||||
|
WRITE(p, "\tdepth = 1.f;\n");
|
||||||
if(dstAlphaMode == DSTALPHA_DUAL_SOURCE_BLEND)
|
if(dstAlphaMode == DSTALPHA_DUAL_SOURCE_BLEND)
|
||||||
WRITE(p, "\tocol1 = float4(0.0f);\n");
|
WRITE(p, "\tocol1 = float4(0.0f);\n");
|
||||||
if(ApiType == API_OPENGL && dstAlphaMode != DSTALPHA_DUAL_SOURCE_BLEND)
|
if (ApiType == API_OPENGL)
|
||||||
WRITE(p, "\tgl_FragData[0] = ocol0;\n");
|
{
|
||||||
|
if (DepthTextureEnable)
|
||||||
|
WRITE(p, "\tgl_FragDepth = depth;\n");
|
||||||
|
if (dstAlphaMode != DSTALPHA_DUAL_SOURCE_BLEND)
|
||||||
|
WRITE(p, "\tgl_FragData[0] = ocol0;\n");
|
||||||
|
}
|
||||||
WRITE(p, "\tdiscard;\n");
|
WRITE(p, "\tdiscard;\n");
|
||||||
if(ApiType != API_D3D11)
|
if(ApiType != API_D3D11)
|
||||||
WRITE(p, "\treturn;\n");
|
WRITE(p, "\treturn;\n");
|
||||||
|
Reference in New Issue
Block a user