rend: PT alpha must be set before shading
Fixes Langrisser Millennium intro fmv and title/main screen. Issue #249 vk oit: use depth buffer like gl oit
This commit is contained in:
parent
9564a947e8
commit
9f60c5e854
|
@ -249,7 +249,9 @@ void main()
|
|||
#endif
|
||||
|
||||
#if cp_AlphaTest == 1
|
||||
if (cp_AlphaTestValue>texcol.a) discard;
|
||||
if (cp_AlphaTestValue > texcol.a)
|
||||
discard;
|
||||
texcol.a = 1.0;
|
||||
#endif
|
||||
#endif
|
||||
#if pp_ShadInstr==0 || pp_TwoVolumes == 1 // DECAL
|
||||
|
@ -308,10 +310,6 @@ void main()
|
|||
|
||||
color *= trilinear_alpha;
|
||||
|
||||
#if cp_AlphaTest == 1
|
||||
color.a=1.0;
|
||||
#endif
|
||||
|
||||
//color.rgb=vec3(gl_FragCoord.w * sp_FOG_DENSITY / 128.0);
|
||||
|
||||
#if PASS == PASS_COLOR
|
||||
|
|
|
@ -197,6 +197,7 @@ void main()
|
|||
#if cp_AlphaTest == 1
|
||||
if (cp_AlphaTestValue > texcol.a)
|
||||
discard;
|
||||
texcol.a = 1.0;
|
||||
#endif
|
||||
#endif
|
||||
#if pp_ShadInstr==0
|
||||
|
@ -246,9 +247,6 @@ void main()
|
|||
color *= trilinear_alpha;
|
||||
#endif
|
||||
|
||||
#if cp_AlphaTest == 1
|
||||
color.a=1.0;
|
||||
#endif
|
||||
//color.rgb=vec3(gl_FragCoord.w * sp_FOG_DENSITY / 128.0);
|
||||
#if TARGET_GL != GLES2
|
||||
highp float w = gl_FragCoord.w * 100000.0;
|
||||
|
|
|
@ -53,22 +53,20 @@ void OITPipelineManager::CreatePipeline(u32 listType, bool autosort, const PolyP
|
|||
|
||||
// Depth and stencil
|
||||
vk::CompareOp depthOp;
|
||||
if (pass == Pass::Color && !pp.isp.ZWriteDis && listType != ListType_Translucent)
|
||||
depthOp = vk::CompareOp::eEqual;
|
||||
else if (listType == ListType_Punch_Through || autosort)
|
||||
if (listType == ListType_Punch_Through || autosort)
|
||||
depthOp = vk::CompareOp::eGreaterOrEqual;
|
||||
else
|
||||
depthOp = depthOps[pp.isp.DepthMode];
|
||||
bool depthWriteEnable;
|
||||
// FIXME temporary Intel driver bug workaround
|
||||
if (pass != Pass::Depth && !((!autosort || GetContext()->GetVendorID() == VENDOR_INTEL) && pass == Pass::Color))
|
||||
depthWriteEnable = false;
|
||||
// Z Write Disable seems to be ignored for punch-through.
|
||||
// Fixes Worms World Party, Bust-a-Move 4 and Re-Volt
|
||||
else if (listType == ListType_Punch_Through)
|
||||
depthWriteEnable = true;
|
||||
else
|
||||
depthWriteEnable = !pp.isp.ZWriteDis;
|
||||
bool depthWriteEnable = false;
|
||||
if (pass == Pass::Depth || pass == Pass::Color)
|
||||
{
|
||||
// Z Write Disable seems to be ignored for punch-through.
|
||||
// Fixes Worms World Party, Bust-a-Move 4 and Re-Volt
|
||||
if (listType == ListType_Punch_Through)
|
||||
depthWriteEnable = true;
|
||||
else
|
||||
depthWriteEnable = !pp.isp.ZWriteDis;
|
||||
}
|
||||
|
||||
bool shadowed = pass == Pass::Depth && (listType == ListType_Opaque || listType == ListType_Punch_Through);
|
||||
vk::StencilOpState stencilOpState;
|
||||
|
|
|
@ -311,6 +311,7 @@ void main()
|
|||
#if cp_AlphaTest == 1
|
||||
if (uniformBuffer.cp_AlphaTestValue > texcol.a)
|
||||
discard;
|
||||
texcol.a = 1.0;
|
||||
#endif
|
||||
#endif
|
||||
#if pp_ShadInstr == 0 || pp_TwoVolumes == 1 // DECAL
|
||||
|
@ -369,10 +370,6 @@ void main()
|
|||
|
||||
color *= pushConstants.trilinearAlpha;
|
||||
|
||||
#if cp_AlphaTest == 1
|
||||
color.a = 1.0;
|
||||
#endif
|
||||
|
||||
//color.rgb=vec3(gl_FragCoord.w * uniformBuffer.sp_FOG_DENSITY / 128.0);
|
||||
|
||||
#if PASS == PASS_COLOR
|
||||
|
|
|
@ -184,6 +184,7 @@ void main()
|
|||
#if cp_AlphaTest == 1
|
||||
if (uniformBuffer.cp_AlphaTestValue > texcol.a)
|
||||
discard;
|
||||
texcol.a = 1.0;
|
||||
#endif
|
||||
#endif
|
||||
#if pp_ShadInstr == 0
|
||||
|
@ -233,9 +234,6 @@ void main()
|
|||
color *= pushConstants.trilinearAlpha;
|
||||
#endif
|
||||
|
||||
#if cp_AlphaTest == 1
|
||||
color.a = 1.0;
|
||||
#endif
|
||||
//color.rgb = vec3(gl_FragCoord.w * uniformBuffer.sp_FOG_DENSITY / 128.0);
|
||||
|
||||
float w = gl_FragCoord.w * 100000.0;
|
||||
|
|
Loading…
Reference in New Issue