Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
8242925: J2DDemo - Anti-Aliasing with Metal differs from OGL
  • Loading branch information
Alexey Ushakov committed Dec 4, 2020
1 parent 2dbceb9 commit 2ea17a6f06aa601b5b449c4ec82f1e3daab2310a
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/java.desktop/macosx/native/libawt_lwawt/awt/shaders.metal
@@ -240,8 +240,10 @@ fragment half4 frag_txt(
float4 pixelColor = renderTexture.sample(textureSampler, vert.texCoords);
float srcA = uniforms.isSrcOpaque ? 1 : pixelColor.a;
if (uniforms.mode) {
float4 c = mix(pixelColor, uniforms.color, srcA);
return half4(c.r, c.g, c.b , c.a);
float3 c = mix(pixelColor.rgb, uniforms.color.rgb, srcA);
return half4(c.r, c.g, c.b ,
(uniforms.isSrcOpaque) ?
uniforms.color.a : pixelColor.a*uniforms.color.a);
}

return half4(pixelColor.r,

0 comments on commit 2ea17a6

Please sign in to comment.