[Webkit-unassigned] [Bug 165297] New: PNG textures with zero alpha channel have wrong rgb colors when reading them in a shader

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 2 01:40:08 PST 2016


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

            Bug ID: 165297
           Summary: PNG textures with zero alpha channel have wrong rgb
                    colors when reading them in a shader
    Classification: Unclassified
           Product: WebKit
           Version: Safari 10
          Hardware: iPhone / iPad
                OS: iOS 10
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebGL
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: nederland074 at gmail.com
                CC: dino at apple.com

Created attachment 295932
  --> https://bugs.webkit.org/attachment.cgi?id=295932&action=review
Test archive (HTML + PNGs)

When reading a texture created from a PNG image in a shader (via the texture2D() call) the rgb color depends on the alpha value. If the alpha is zero, when the rgb color is completely black regardless of what's actually stored in texture channels. If the alpha is non-zero (even if it's 1/255) the rgb color is correct. This behavior makes it more difficult to use a texture as a storage for independent data in a form of packed together rgba channels.

This issue doesn't occur for a similar texture, that's created from a uint8array array buffer, so it's probably related to PNG images. Also, this issue doesn't occur in Safari/Chrome/Firefox under macOS 10.10.3.

In the attachment there is the example that demonstrates rendering the RGB color from a red texture which alpha channel filled with 1/255 value (working_image.png) and with zero value (not_working_image.png). Both should be red, but the latter is black on iPad.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20161202/2dd9011f/attachment.html>


More information about the webkit-unassigned mailing list