fixed alpha to coverage for the greater than 0 alpha test

This commit is contained in:
myT 2020-05-09 17:11:47 +02:00
parent d6f77a9b35
commit f484ee94a7
2 changed files with 2 additions and 2 deletions

View file

@ -133,7 +133,7 @@ float4 ps_main(VOut input) : SV_Target0
#ifdef CNQ3_A2C #ifdef CNQ3_A2C
if(alphaTest == 1) if(alphaTest == 1)
r.a = CorrectAlpha(0.0, r.a, input.texCoords); r.a = r.a > 0.0 ? 1.0 : 0.0;
else if(alphaTest == 2) else if(alphaTest == 2)
r.a = CorrectAlpha(0.5, 1.0 - r.a, input.texCoords); r.a = CorrectAlpha(0.5, 1.0 - r.a, input.texCoords);
else if(alphaTest == 3) else if(alphaTest == 3)

View file

@ -386,7 +386,7 @@ static const char* generic_fs =
"\n" "\n"
"#if CNQ3_A2C\n" "#if CNQ3_A2C\n"
" if(alphaTest == uint(1))\n" " if(alphaTest == uint(1))\n"
" r.a = CorrectAlpha(0.0, r.a, texCoords1FS);\n" " r.a = r.a > 0.0 ? 1.0 : 0.0;\n"
" if(alphaTest == uint(2))\n" " if(alphaTest == uint(2))\n"
" r.a = CorrectAlpha(0.5, 1.0 - r.a, texCoords1FS);\n" " r.a = CorrectAlpha(0.5, 1.0 - r.a, texCoords1FS);\n"
" else if(alphaTest == uint(3))\n" " else if(alphaTest == uint(3))\n"