Fix negative winding issue

https://github.com/3b1b/manim/issues/2146
This commit is contained in:
Grant Sanderson 2024-10-23 17:40:31 -05:00
parent 837bb14c03
commit 199395b6e3

View file

@ -446,6 +446,11 @@ class VShaderWrapper(ShaderWrapper):
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;