Skip to content

Commit

Permalink
Merge pull request #2230 from 3b1b/video-work
Browse files Browse the repository at this point in the history
Misc. bug fixes
  • Loading branch information
3b1b authored Oct 23, 2024
2 parents eca370f + 199395b commit e1816c2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions manimlib/shader_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,11 @@ def get_fill_canvas(ctx: moderngl.Context) -> Tuple[Framebuffer, VertexArray, Fr
color = texture(Texture, uv);
if(color.a == 0) discard;
if(color.a < 0){
color.a = -color.a / (1.0 - color.a);
color.rgb *= (color.a - 1);
}
// Counteract scaling in fill frag
color *= 1.06;
Expand Down
1 change: 1 addition & 0 deletions manimlib/shaders/textured_surface/frag.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ void main() {
float alpha = smoothstep(-dark_shift, dark_shift, dp);
color = mix(dark_color, color, alpha);
}
if (color.a == 0) discard;

frag_color = finalize_color(
color,
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ colour
ipython>=8.18.0
isosurfaces
fontTools
manimpango>=0.4.0.post0,<0.5.0
manimpango>=0.6.0
mapbox-earcut
matplotlib
moderngl
Expand Down

0 comments on commit e1816c2

Please sign in to comment.