Bug 259768

Summary: SRGB8_ALPHA8 is broken when using video textures.
Product: WebKit Reporter: Michael Herzog <michael.herzog>
Component: WebGLAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: dino, kbr, kkinnunen, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 16   
Hardware: Mac (Apple Silicon)   
OS: macOS 13   

Description Michael Herzog 2023-08-03 01:48:15 PDT
three.js is using SRGB8_APLHA8 for sRGB encoded textures. That works fine for textures loaded via the <img> or <canvas> tag.

three.js provides a video texture class based on the <video> tag like demonstrated in the following example.

https://threejs.org/examples/webgl_video_panorama_equirectangular

As you can see, the colors are washed out though. That's because when configuring the video texture as SRGB8_APLHA8, the color space conversion to linear-srgb does not work anymore.

The demo does work as expected in Edge, Chrome and Firefox.
Comment 1 Michael Herzog 2023-08-03 01:51:38 PDT
Permanent link to the example which demonstrates the issue: https://rawcdn.githack.com/mrdoob/three.js/r155/examples/webgl_video_panorama_equirectangular.html
Comment 2 Kimmo Kinnunen 2023-08-09 00:59:41 PDT
Thanks, I can repro.
Comment 3 Radar WebKit Bug Importer 2023-08-09 00:59:51 PDT
<rdar://problem/113614958>
Comment 4 Kimmo Kinnunen 2023-08-09 01:00:51 PDT
Working on this in bug 222822

*** This bug has been marked as a duplicate of bug 222822 ***