浏览代码

Discard transparent parts of textured surfaces

Grant Sanderson 4 天之前
父节点
当前提交
aaa28a2712
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      manimlib/shaders/textured_surface/frag.glsl

+ 1 - 0
manimlib/shaders/textured_surface/frag.glsl

@@ -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,