Bug 248339

Summary: Babylon.js Shadows are incorrect on iOS with WebGL via Metal
Product: WebKit Reporter: dizel3d <dizel3d>
Component: ANGLEAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: dino, djg, kbr, kkinnunen, kpiddington, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 16   
Hardware: iPhone / iPad   
OS: iOS 16   
URL: https://forum.babylonjs.com/t/pcf-looks-bad-on-ios/35988
Attachments:
Description Flags
iOS 15.5 Safari
none
MacOS 12.6.1 Chrome, reference
none
iOS 15.5 Safari with disabled WebGL via Metal none

Description dizel3d 2022-11-25 02:50:47 PST
Created attachment 463724 [details]
iOS 15.5 Safari

I use Babylon.js. And I faced with an issue connection with shadow rendering. Shadows with PCF look ugly on iOS 15+ until disabling the WebGL via Metal experimental feature in Safari.
Original thread on Babylon.js Forum has more details: https://forum.babylonjs.com/t/pcf-looks-bad-on-ios/35988
Comment 1 dizel3d 2022-11-25 02:54:22 PST
Created attachment 463725 [details]
MacOS 12.6.1 Chrome, reference
Comment 2 dizel3d 2022-11-25 03:06:43 PST
Created attachment 463726 [details]
iOS 15.5 Safari with disabled WebGL via Metal
Comment 3 dizel3d 2022-11-25 03:08:40 PST
Here's a test example https://playground.babylonjs.com/#IIZ9UU#369

On iOS 15.5 Safari with ENABLED WebGL via Metal looks INCORRECTLY:
https://bugs.webkit.org/attachment.cgi?id=463724

On iOS 15.5 Safari with DISABLED WebGL via Metal CORRECTLY:
https://bugs.webkit.org/attachment.cgi?id=463726
Comment 4 Radar WebKit Bug Importer 2022-11-26 14:41:23 PST
<rdar://problem/102683818>
Comment 5 Kenneth Russell 2022-11-28 15:25:30 PST
I think this is a duplicate of Bug 232071. It's related to the filterability of depth textures when using certain depth compare modes.