<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>259768</bug_id>
          
          <creation_ts>2023-08-03 01:48:15 -0700</creation_ts>
          <short_desc>SRGB8_ALPHA8 is broken when using video textures.</short_desc>
          <delta_ts>2023-08-09 01:00:51 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebGL</component>
          <version>Safari 16</version>
          <rep_platform>Mac (Apple Silicon)</rep_platform>
          <op_sys>macOS 13</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>222822</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael Herzog">michael.herzog</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>dino</cc>
    
    <cc>kbr</cc>
    
    <cc>kkinnunen</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1969400</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Herzog">michael.herzog</who>
    <bug_when>2023-08-03 01:48:15 -0700</bug_when>
    <thetext>three.js is using SRGB8_APLHA8 for sRGB encoded textures. That works fine for textures loaded via the &lt;img&gt; or &lt;canvas&gt; tag.

three.js provides a video texture class based on the &lt;video&gt; 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&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1969401</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Herzog">michael.herzog</who>
    <bug_when>2023-08-03 01:51:38 -0700</bug_when>
    <thetext>Permanent link to the example which demonstrates the issue: https://rawcdn.githack.com/mrdoob/three.js/r155/examples/webgl_video_panorama_equirectangular.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1970255</commentid>
    <comment_count>2</comment_count>
    <who name="Kimmo Kinnunen">kkinnunen</who>
    <bug_when>2023-08-09 00:59:41 -0700</bug_when>
    <thetext>Thanks, I can repro.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1970256</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-08-09 00:59:51 -0700</bug_when>
    <thetext>&lt;rdar://problem/113614958&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1970257</commentid>
    <comment_count>4</comment_count>
    <who name="Kimmo Kinnunen">kkinnunen</who>
    <bug_when>2023-08-09 01:00:51 -0700</bug_when>
    <thetext>Working on this in bug 222822

*** This bug has been marked as a duplicate of bug 222822 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>