Skip to content

Commit

Permalink
Copy the image alpha changes to mobile GLES
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Dec 16, 2024
1 parent a032b58 commit 7fea2eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/painter/gl/shaders.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion internal/painter/gl/shaders/simple_es.frag
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@ uniform sampler2D tex;
varying vec2 fragTexCoord;

void main() {
gl_FragColor = texture2D(tex, fragTexCoord);
vec4 texColor = texture2D(tex, fragTexCoord);
if(texColor.a < 0.01)
discard;
gl_FragColor = texColor;
}

0 comments on commit 7fea2eb

Please sign in to comment.