Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PCF Shadow render issue with IPhone #3590

Open
flyingbaba opened this issue Oct 18, 2021 · 15 comments
Open

PCF Shadow render issue with IPhone #3590

flyingbaba opened this issue Oct 18, 2021 · 15 comments
Assignees
Labels
area: graphics Graphics related issue bug

Comments

@flyingbaba
Copy link

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

  1. Open https://playcanvas.com/editor/scene/1252918
  2. Hit Launch

On a real scene with lots of models it is very obvious that PCF is broken.

@slimbuck
Copy link
Member

Please attach a screenshot if you can for those of us without and iphone?

@slimbuck slimbuck added area: graphics Graphics related issue bug labels Oct 18, 2021
@leonidaspir
Copy link
Contributor

We got the same rendering issue on our project in the following device:

Running on an iPad 2020 (8th generation) on iOS 15:
image

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:
image

@flyingbaba
Copy link
Author

@leonidaspir Thanks for the screenshots. We have a blank Iphone without apps and it is a nightmare to transfer a file from it (((

@yaustar
Copy link
Contributor

yaustar commented Oct 18, 2021

Side note: If you have a Mac, you can take screenshot on device and transfer via USB using Image Capture app on the Mac.

@mvaligursky
Copy link
Contributor

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
iphoneXR

Mac OS (Safari 15) - correct
MacOS

Google Pixel 3A XL - correct
google pixel

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
iphone_single_sample

on other devices, it does 2x2 PCF filtering as expected
pixel3a_single_sample

The shadow map seems to be set up correctly for PCF filtering
Screenshot 2021-10-18 at 18 18 34

@mvaligursky
Copy link
Contributor

mvaligursky commented Oct 18, 2021

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)
emulator_single_sample

@mvaligursky
Copy link
Contributor

WebKit issue: https://bugs.webkit.org/show_bug.cgi?id=232071

@grorg
Copy link

grorg commented Oct 21, 2021

Sorry for the delay. I have not forgotten!

@grorg
Copy link

grorg commented Oct 21, 2021

Thank you so much for filing a bug report (and your investigation).

@mvaligursky
Copy link
Contributor

status of the webkit bug was just changed. Fingers crossed we'll se it soon in Safari.
Resolution | FIXED

@yaustar
Copy link
Contributor

yaustar commented Jan 11, 2022

Still not released on iOS 15.2

@mvaligursky
Copy link
Contributor

update from the webkit ticket: This change should be present in STP 139, iOS 15.4 Beta, and macOS 12.3 Beta.

@mvaligursky
Copy link
Contributor

Still not functioning on iPhone XR running 15.5, both in Safari and Chrome.
@grorg - should this be part of 15.5 yet?

@mvaligursky
Copy link
Contributor

Note that this still does not work on iPhone XR 16.1.1, tested in Safari.
I'll update the mentioned webkit ticket.

@willeastcott
Copy link
Contributor

Looks like this is still an issue in iOS 17.4.1. Can you confirm @mvaligursky?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: graphics Graphics related issue bug
Projects
None yet
Development

No branches or pull requests

7 participants