Created attachment 295932 [details] 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.
<rdar://problem/29630830>
2 years and this bug is still not fixed? iOS safari does not pass the conformance tests https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/misc/gl-teximage.html?webglVersion=1&quiet=0&quick=1
This issue was also reported at the three.js forum (https://discourse.threejs.org/t/texture-rgb-values-are-zero-when-alpha-is-zero-on-ios/6840). We've added a fiddle that should work as an additional test case. Normally, the entire plane should be red. On iOS Safari and Chrome, the bottom left part of the plane is black. https://jsfiddle.net/vyzc2sgj/1/
5 years later, this issue is still not fixed.