Created attachment 471043 [details] Screen shot of incorrect rendering https://domenicobrz.github.io/webgl/projects/SSRefractionDepthPeeling/ renders incorrectly on an iPhone 15 Pro Max running iOS 17.4.1. It renders correctly on desktop Safari on Apple Silicon. Could this be related to GPU register pressure, and failure to compile certain shaders? I don't have a DevTools debugging environment set up for this configuration.
Note: source code for this demo is https://github.com/Domenicobrz/Domenicobrz.github.io/tree/master/webgl/projects/SSRefractionDepthPeeling . I've contacted the demo author; he won't be able to debug this soon, but if it's possible to narrow down the cause of the failure on iPhones, this might inform more general fixes to ANGLE.
The doubleDepthBuffer has this: this.ping = new THREE.WebGLRenderTarget(innerWidth, innerHeight, { type: THREE.FloatType, depthBuffer: false, stencilBuffer: false, }); this.pong = new THREE.WebGLRenderTarget(innerWidth, innerHeight, { type: THREE.FloatType, depthBuffer: false, stencilBuffer: false, }); this.frontFaceRT = new THREE.WebGLRenderTarget(innerWidth, innerHeight, { type: THREE.FloatType, }); It may use the EXT_float_blend to do the rendering, which iOS doesn't support..
For the record, Alexey Knyazev diagnosed this and it seems to be a bug in the demo where it assumes the presence of OES_texture_float_linear, which doesn't exist on iOS. This is a common problem causing un-portability of WebGL apps to iOS so we're going to update the WebGL Best Practices on MDN to highlight this, and also try to propose a PR against the upstream demo to use fp16 textures rather than fp32, which will also implicitly fix this problem.
<rdar://problem/127242438>