This commit is contained in:
2025-02-07 17:04:43 -06:00
parent 33fd7ddf72
commit 8eec81c7f4
2249 changed files with 75331 additions and 685 deletions

View File

@@ -0,0 +1,16 @@
#if ALPHATOCOVERAGE
uniform sampler2D g_Texture0; // {"material":"albedo"}
varying vec2 v_TexCoord;
#endif
void main() {
#if ALPHATOCOVERAGE
vec4 albedo = texSample2D(g_Texture0, v_TexCoord.xy);
albedo.a = (albedo.a - 0.5) / max(fwidth(albedo.a - 0.9), 0.0001) + 0.5;
gl_FragColor = albedo;
#if GLSL
if (gl_FragColor.a < 0.5) discard;
#endif
#endif
}