Weird artifacting on textures generated on an iPad running iOS <15

I increased the VSM Bias settings on our lights and that seems to have fixed the artifact/banding issue. However, it causes certain iOS devices to crash.

In our testing, it crashes on an iPad 6th gen running iOS 15.4 and an iPhone 6s w iOS 15.4, but a 7th Gen iPad with 15.3.1 doesn’t crash

1 Like

VSM bias on its own shouldn’t increase memory allocation, which is usually the crash cause on iOS.

In any case, can you check using the profiler what’s your VRAM allocation just before the crash?

1 Like

Do you mean the PlayCanvas profiler? Is there a way to open it on iPad?

1 Like

Yes, if you enable the profiler and launch from the editor, share that url with your iPad and the profiler will open there too.

1 Like

If you have a repo project that is sharable which we could look at, that would be great.

iOS 15.4 was just released and there are bugs raised in WebKit around WebGL too against this specific version

1 Like

On browserstack at least it seems like most affected devices are actually iOS 14 and most iOS 15 devices are not affected. But some are

1 Like

If you are able to provide a reproducible, it would really help us investigate. Very odd that changing the VSM bias would crash anything :thinking:

2 Likes

We discovered an interesting workaround.

Basically we just added a collection of large objects outside of the camera view. This mostly fixes the issue for some reason.

Here are the objects I’ve added to the sample project:

Here is a closer look at the actual camera setup. Basically just a ortho cam fitted to a white plane:

Here is the publish link for testing: Shadow Banding on iPads Sample - PLAYCANVAS

The numbers on the left represent the total range of pixel colors sampled from a vertical line in the center of the image from 25% to 75% height. I’ve been using this to quantify how bad the issue is. The “Toggle Objects” button on the right side turns the objects on/off and recalculates the banding statistic.

Objects on:

Objects off:

In my tinkering the plane on the floor makes the biggest difference, but the cubes also seem to affect things a bit. In my mind this points to some kind of boundary issue when computing shadows.

We’ve also discovered that this happens extremely badly on Intel Iris XE devices, seemingly even worse than we’ve seen on iPads.

1 Like

Wondering if its related to the size of the shadow map generated with larger objects in the scene :thinking:

Does this method create high enough quality shadows with your door models?

1 Like

yes, according to our testing so far this appears to fix the problem with the doors.

2 Likes

Wondering if its related to the size of the shadow map generated with larger objects in the scene

This is what I suspect, all of our door models are about 1-2 inches in thickness and there’s not much else in the scene. We do have an inverted sphere around the doors to block visibility but its origin is basically (0, 0, 0)

2 Likes