Particle Editor
2024
In my free time, I created a particle editor to address frustrations from previous projects, where tweaking particle effects was slow due to the need for project rebuilds or excessive debug sliders. My goal was to build an editor that:
- Saved and loaded effects using JSON
- Allowed live editing via UI, which is why I chose ImGui for its fast and easy setup
- Ran particles on the GPU using Compute Shaders, improving performance compared to previous projects where particles had a significant impact, often requiring a reduction in effect resolution

Key Features
Particles: I developed a separate library for running particle effects, independent of the editor itself. This separation allows the particle system to be integrated into other projects while keeping the editor optional as a standalone tool.
To handle particles efficiently, I implemented:
- Compute shaders for particle emission and updates
- Constant buffers to modify emission and update behavior using saved JSON data
In a short time, I implemented key features, including:
- Cone emission with adjustable direction and angle
- Particle pooling with a defined limit
- Configurable sprite selection and blending modes
- Spawn control, supporting both constant rates and bursts
- Velocity control, including initial velocity and acceleration
- Sprite rotation, size control and various lifetime-based alpha transitions
- Depth sorting using a parallel compute sort algorithm
- Soft particles, where alpha fades near surfaces to prevent harsh intersections
Editor: I used ImGui to create a basic editor featuring numeric inputs, sliders and selectable tabs. The editor includes playback controls, allowing users to pause, restart, stop or adjust playback speed while creating particles. It also supports looping options, with all parameters serialized and saved to JSON.
Additionally, I implemented multiple emitters within a single particle system, enabling:
- Emitters to be saved separately and reused in different systems
- Live toggling of emitter visibility for better control
Challenges, solutions and lessons learnt
I gained significant experience with ImGui and after working on subsequent projects, I've learned additional features and identified ways to improve my editor's usability and workflow. The most challenging aspect was working with compute shaders, particularly reworking algorithms to function in parallel and organizing them efficiently. Given the many features I wanted to support, I needed to structure the code by separating different functions into separate HLSL files and including them as needed to avoid bloating a single file. I also planned to implement a preprocessor step to control which includes are used. For example, this would allow disabling specific features like burst spawning, ensuring the relevant functions wouldn't even be included in the compute shader.