I just done reviving my 5-year-old 2D particle system and add supports for GPU particles. The APIs for the new particle system is similar to the old one so one can just swap the class to the new system and it “just work”
screenshot, render 1 million particles on screen & FPS is still stable at 60
A few things:
- The new particle system makes use of Transform Feedback and some OpenGL 3+ stuff, so an OpenGL 3.3+ compatible graphics card is required. This also mean it will not work on mobile, as CGE still uses GLES2 for mobile devices. The old particle system is still available for those who wants to target low-end systems.
- Due to the way new system handles lifecycles, if ReleaseWhenDone field is true, particle emitter will immediately remove itself once EmissionTime = 0.
- It is implemented by calling OpenGL APIs directly, so if CGE caches OpenGL states somewhere then there’s chance it will mess up rendering (I haven’t noticed anything weird so far).