Skip to content

Commit

Permalink
Vulkan: disabled r_ext_alpha_to_coverage for now due to rendering art…
Browse files Browse the repository at this point in the history
…ifacts on beyond4-wfa map
  • Loading branch information
ec- committed Feb 17, 2024
1 parent fddf0a8 commit 4b2b072
Show file tree
Hide file tree
Showing 5 changed files with 1,751 additions and 2,978 deletions.
4 changes: 4 additions & 0 deletions code/renderervk/shaders/gen_frag.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ layout (constant_id = 10) const int acff = 0; // NONE, RGB, RGBA, ALPHA
#endif

#ifdef USE_ATEST
#if 0
float CorrectAlpha(float threshold, float alpha, vec2 tc)
{
ivec2 ts = textureSize(texture0, 0);
Expand All @@ -113,6 +114,7 @@ float CorrectAlpha(float threshold, float alpha, vec2 tc)
return ac;
}
#endif
#endif

void main() {
#ifdef USE_FOG
Expand Down Expand Up @@ -451,6 +453,7 @@ void main() {
#endif // !USE_TX1

#ifdef USE_ATEST
#if 0
if (alpha_to_coverage != 0) {
if (alpha_test_func == 1) {
base.a = base.a > 0.0 ? 1.0 : 0.0;
Expand All @@ -460,6 +463,7 @@ void main() {
base.a = CorrectAlpha(alpha_test_value, base.a, frag_tex_coord0);
}
} else
#endif
// specialization: alpha-test function
if (alpha_test_func == 1) {
if (color0.a == alpha_test_value) discard;
Expand Down
Loading

0 comments on commit 4b2b072

Please sign in to comment.