[Webkit-unassigned] [Bug 164540] HLS WebGL video textures produces faulty colour rendering in IOS 10

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 19 09:31:29 PST 2016


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

--- Comment #7 from Daniel Rossi <electroteque at gmail.com> ---
Someone was lucky to figure out what it was. 

Webkit is delivering textures from HLS video with rgb colours switched around. The red and blue is switched. 

I believe they ran a test by switching the colours in the source file. This solution isn't good enough because it will be impossible to work around with live streams. 

please see commend

https://github.com/mrdoob/three.js/issues/9754#issuecomment-267840695

I believe you can do something like this to swap the red and blue colours but it doesn't work in that raw webgl demo. It needs other stuff changed

gl.shaderSource(ps, "precision mediump float;uniform sampler2D sm;varying vec2 tx;void main(){gl_FragColor=texture2D(sm,txt).bgra;}");


So 

texture2D(sm,txt)

is collecting the texture colours

and

bgra swaps the red and blue colour channel order.

-- 
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/20161219/b108baf8/attachment.html>


More information about the webkit-unassigned mailing list