engine
engine copied to clipboard
PCF Shadow render issue with IPhone
Shadows are looking weird, pixelated on the edges.
PCF Shadow render issue with Iphone7, iOS 15.0 Tested also with Iphone5 SE, iOS 11 (same result)
Steps to Reproduce
- Open https://playcanvas.com/editor/scene/1252918
- Hit Launch
On a real scene with lots of models it is very obvious that PCF is broken.
Please attach a screenshot if you can for those of us without and iphone?
We got the same rendering issue on our project in the following device:
Running on an iPad 2020 (8th generation) on iOS 15:
Up close the issue isn’t that obvious because the resolution is high, though if you go close filtering is still bad on the edges:
@leonidaspir Thanks for the screenshots. We have a blank Iphone without apps and it is a nightmare to transfer a file from it (((
Side note: If you have a Mac, you can take screenshot on device and transfer via USB using Image Capture app on the Mac.
I did some testing, and it seems the hardware PCF compare is not working in iOS devices. This requires iOS 15, as that's where the WebGL2 is enabled, and so the hardware PCF is used.
@grorg - I wonder if you give this a test on your side as well please.
Steps to repro: http://playcanvas.github.io/#/graphics/shadow-cascades in Controls, set Count to 1, resolution to around 512, filtering PCF3 (it's easier to click on sliders than slide them)
iPhone XR (iOS 15) - incorrect
Mac OS (Safari 15) - correct
Google Pixel 3A XL - correct
I also modified code (don't have a repro available to public) to do a single sample from depth shadow sampler. On iOS, this comes up as black & white shadow
on other devices, it does 2x2 PCF filtering as expected
The shadow map seems to be set up correctly for PCF filtering
I also tried xcode Simulator, iPhone 8 Pro, iOS 15, Simulator 13.0 (970), and in both cases get no shadow at all (or more like full shadow everywhere)
WebKit issue: https://bugs.webkit.org/show_bug.cgi?id=232071
Sorry for the delay. I have not forgotten!
Thank you so much for filing a bug report (and your investigation).
status of the webkit bug was just changed. Fingers crossed we'll se it soon in Safari. Resolution | FIXED
Still not released on iOS 15.2
update from the webkit ticket: This change should be present in STP 139, iOS 15.4 Beta, and macOS 12.3 Beta.
Still not functioning on iPhone XR running 15.5, both in Safari and Chrome. @grorg - should this be part of 15.5 yet?
Note that this still does not work on iPhone XR 16.1.1, tested in Safari. I'll update the mentioned webkit ticket.