Skip to content

Commit

Permalink
return empty color when not part of stripe to be drawn
Browse files Browse the repository at this point in the history
  • Loading branch information
zimmermannubique committed Feb 8, 2024
1 parent 17a6435 commit c24ff6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ios/graphics/Shader/Metal/PolygonGroupShader.metal
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ polygonGroupStripedFragmentShader(PolygonGroupVertexOut in [[stage_in]],
float totalPx = s.stripeInfoX + s.stripeInfoY;
float adjLineWPx = s.stripeInfoX / scaleFactors.y * scaleFactors.x;
if (fmod(disPx, totalPx) > adjLineWPx) {
return float4(0.0, 1.0, 0.0, 0.0);
return float4(0.0, 0.0, 0.0, 0.0);
}

return float4(s.color[0], s.color[1], s.color[2], 1.0) * s.opacity * s.color[3];
Expand Down

0 comments on commit c24ff6a

Please sign in to comment.