Bug 259768 - SRGB8_ALPHA8 is broken when using video textures.
Summary: SRGB8_ALPHA8 is broken when using video textures.
Status: RESOLVED DUPLICATE of bug 222822
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: Safari 16
Hardware: Mac (Apple Silicon) macOS 13
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-08-03 01:48 PDT by Michael Herzog
Modified: 2023-08-09 01:00 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***