Skip to content

Commit 199395b

Browse files
committed
Fix negative winding issue
#2146
1 parent 837bb14 commit 199395b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

manimlib/shader_wrapper.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,11 @@ def get_fill_canvas(ctx: moderngl.Context) -> Tuple[Framebuffer, VertexArray, Fr
446446
color = texture(Texture, uv);
447447
if(color.a == 0) discard;
448448
449+
if(color.a < 0){
450+
color.a = -color.a / (1.0 - color.a);
451+
color.rgb *= (color.a - 1);
452+
}
453+
449454
// Counteract scaling in fill frag
450455
color *= 1.06;
451456

0 commit comments

Comments
 (0)