Skip to content

Commit e1816c2

Browse files
authored
Merge pull request #2230 from 3b1b/video-work
Misc. bug fixes
2 parents eca370f + 199395b commit e1816c2

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
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

manimlib/shaders/textured_surface/frag.glsl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ void main() {
2626
float alpha = smoothstep(-dark_shift, dark_shift, dp);
2727
color = mix(dark_color, color, alpha);
2828
}
29+
if (color.a == 0) discard;
2930

3031
frag_color = finalize_color(
3132
color,

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ colour
22
ipython>=8.18.0
33
isosurfaces
44
fontTools
5-
manimpango>=0.4.0.post0,<0.5.0
5+
manimpango>=0.6.0
66
mapbox-earcut
77
matplotlib
88
moderngl

0 commit comments

Comments
 (0)