<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - HLS WebGL video textures produces faulty colour rendering in IOS 10"
href="https://bugs.webkit.org/show_bug.cgi?id=164540#c7">Comment # 7</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - HLS WebGL video textures produces faulty colour rendering in IOS 10"
href="https://bugs.webkit.org/show_bug.cgi?id=164540">bug 164540</a>
from <span class="vcard"><a class="email" href="mailto:electroteque@gmail.com" title="Daniel Rossi <electroteque@gmail.com>"> <span class="fn">Daniel Rossi</span></a>
</span></b>
<pre>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
<a href="https://github.com/mrdoob/three.js/issues/9754#issuecomment-267840695">https://github.com/mrdoob/three.js/issues/9754#issuecomment-267840695</a>
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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>