I followed the chapter 16 tutorial up to the point where fireworks should show on the Live View. I’m using a Mid 2014 MBP with the Intel Iris 1536 MB chip which I acknowledge it’s not the best GPU ever, but so far it has been doing mostly great. However, to my surprise, it seems to complete collapse with the fireworks example. When I run the playground with the default count for emitters and particles, the Mac will freeze. I tried to reduce the values to 100 particles (instead of 10000) and 1 emitter (instead of 8), and not only it still freezes, but the entire screen becomes black, as if the GPU had stopped working at all and the screen wasn’t getting a signal. I copied the code to a newer Mac with a discrete GPU just to make sure I didn’t mess something up, and it ran fine.
Even knowing it’s not a discrete GPU, I’m sure this thing can handle 100 particles at a time, so… what might be going on here? Maybe too many threads? I’m very new to GPU programming, so I would like to have a hint about what the problem might be before I crash my Mac again.
hi Miguel. sorry to hear about the Intel GPU issues. while it’s a great overall GPU for system tasks, it is not well suited for compute-intensive tasks such as particle systems. in retrospect, I am also having regrets for not having written this part in a regular Xcode project instead of a playground. a pertinent advice I can give you is to restart Xcode every time a playground crashes because sometimes that is the only way to make it work again.
I suspect this is not the GPU fault after all. I have the fire/snow example running with both fire and snow emitters at the same time at a beautiful 60fps (looks so cosy, especially here in Canada!). I’m probably hitting some bad bug related to the Xcode playground/live view (it completely freezes the OS, not just Xcode). I’ll try the fireworks again running on a standalone app when I have some time, it will probably work fine.
I think it’s a combination of both… but I cannot say for sure. I am glad you are able to sit by the fire though let us know if there is anything else you need assistance with.