[Webkit-unassigned] [Bug 214948] REGRESSION: [ ios14 ] webgl/1.0.3/conformance/glsl/functions/glsl-function-sign.html and webgl/1.0.3/conformance/glsl/misc/glsl-function-nodes.html are failing consistently.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 29 18:09:03 PDT 2020


https://bugs.webkit.org/show_bug.cgi?id=214948

--- Comment #11 from Dean Jackson <dino at apple.com> ---
The problem is that the built-in sign appears to be a no-op. ie. sign(-0.5) returns -0.5.

Here's my test case:

void main()
{
   gl_Position = aPosition;
   vec2 texcoord = vec2(aPosition.xy * 0.5 + vec2(0.5, 0.5));
   vec4 color = vec4(
       texcoord,
       texcoord.x * texcoord.y,
       (1.0 - texcoord.x) * texcoord.y * 0.5 + 0.5);

   // New code here.
   float a = (color.x * 2.0 - 1.0) < 0.0 ? -1.0 : 1.0;
   float b = sign(color.x * 2.0 - 1.0);
   if (a != b) {
      vColor = vec4(1.0, 0.0, 0.0, 1.0);
   } else {
    vColor = vec4(
      sign(color.x * 2.0 - 1.0) * 0.5 + 0.5,
      0.5,
      0,
      1);
   }
}

... which shouldn't produce any red, but it does between about texCoords [0.25,0.75]

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200730/e73bb2c5/attachment.htm>


More information about the webkit-unassigned mailing list