1
0
Fork 0
forked from wry/wry

Adds a discard_threshold push-constant to the tex / rounded_tex shaders

This commit is contained in:
entailz 2026-05-20 18:47:16 -07:00
parent e2de688324
commit bb43c238e3
17 changed files with 38 additions and 22 deletions

View file

@ -16,6 +16,9 @@ layout(location = 0) out vec4 out_color;
void main() {
vec4 c = textureLod(sampler2D(tex, sam), tex_pos, 0);
if (c.a < data.discard_threshold) {
discard;
}
if (eotf != inv_eotf || has_matrix || alpha_mode != AM_PREMULTIPLIED_ELECTRICAL) {
vec3 rgb = c.rgb;
if (src_has_alpha && alpha_mode == AM_PREMULTIPLIED_ELECTRICAL) {