Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Catalog · How the catalog works

Random project

cge-3d-particle-emitter

GPU-based Particle System for Castle Game Engine

View on GitHub

Anyone may press Interesting, signed in or not. It helps others find this project.

Member rating

No ratings yet.

Sign in to rate this project.

README

GPU-based Particle System for Castle Game Engine

Web Demo: https://kagamma.github.io/cge-3d-particle-demo

Support platforms: Windows, Linux, Android, Web

Support platforms but not test due to lack of hardware: OSX, iOS

Support APIs: OpenGL 3.3, OpenGL ES 3.0, WebGL2

Notes

Due to emitter uses direct OpenGL calls instead of CGE's own renderer, only a few of TCastleScene's features are supported at the moment:

  • DistanceCulling works based on Position.
  • BoundingBox and frustum culling works. The emitter doesn't calculate bounding box so you need to set up bounding box manually via Effect.BBox property, either by code or by using castle-editor.
  • Visible works.
  • The component registers to TRenderStatistics as 1 Shape / 1 Scene.
  • Instancing, by putting the same emitter to multiple TCastleTransform nodes works. It doesn't use GPU instancing at the moment. Note that it is necessary to set AllowsInstancing = True for this to work.
  • If AllowsInstancing = False, then particle's position is independent from emitter's transformation.
  • Use ProcessEvents for start / stop emitting.
  • AnimateWhenOnlyVisible = False will stop update particle if emitter's boundingbox is outside of view frustum.

How to use

See EffectReference.md

License: MIT.