Skip to content

[impeller] aa line disappear when scaled down #165994

@gaaclarke

Description

@gaaclarke

reproduction

  1. AiksTest.ScaleExperimentAntialiasLines
  2. Set the line width to 2, the scale to 0.2
--- a/engine/src/flutter/impeller/entity/shaders/line.frag
+++ b/engine/src/flutter/impeller/entity/shaders/line.frag
@@ -41,6 +40,7 @@ float CalculateLine() {
 
 void main() {
   float line = CalculateLine();
-  frag_color = vec4(frag_info.color.xyz, line);
+  // frag_color = vec4(frag_info.color.xyz, line);
+  frag_color = vec4(mix(vec3(1.0, 0.0, 0.0), frag_info.color.xyz, line), 1.0);
   frag_color = IPPremultiply(frag_color);
 }

observed results

In this image red is where the fragment shader is returning zero, the actual line is lime green but is isn't visible at all.

Image

expected results

I expect the line to be lime green, not red.

Metadata

Metadata

Assignees

No one assigned

    Labels

    e: impellerImpeller rendering backend issues and features requeststeam-engineOwned by Engine team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions