I’ve tested my game on 3 devices;
- Windows PC, on which my game runs very smoothly at 150 FPS
- MacBook Pro (16 inch, 2019) - Graphics card: Intel UHD Graphics 630 1536 MB
- iMac21,2 with Apple M1 chip (which acts as both a CPU and GPU, from what I’ve read?)
Problem:
My game runs smoothly with no issues on my Windows PC, and my MacBook Pro laptop. Consistent 60 FPS on both, no problem.
However, when trying to run it on the iMac, it was getting 6-8 FPS only. After playing around a bit, I discovered that if I didn’t add any of the meshes as shadow casters to my BABYLON.ShadowGenerator
, the FPS rose to ~40. And finally, if I didn’t instantiate a BABYLON.ShadowGenerator
at all, the FPS hit a solid 60. So it seems like the mere presence of a ShadowGenerator
in the scene, even if there are zero meshes casting shadows, would cause a massive 20 FPS drop.
This occurred in all browsers on the iMac, and I checked chrome settings and hardware acceleration was definitely enabled.
Any ideas as to what’s happening here? Has anyone else encountered similar issues with Macs with the M1 chip?
I don’t think there’s anything special about the way I’m using the ShadowGenerator
, I’m doing everything in basically the same way as the BabylonJS tutorials specified. (for details about my code, I went into more detail in this other thread, about a separate issue with shadows that I’m experiencing: Shadow quality low with moving / "quivering" edges)