This is my final project from the Game Development program at Fanshawe. This involved adding many new features to my game engine.
Features implemented in this project: GPU Particle System, Instance Rendering, Deferred Rendering, Screen Space Decals, Animation Blending, ECS with custom memory management, Bloom
Download Demo HereI implemented a particle system that handles millions of particles with a responsive frame rate. Particle updates and creation is handled in GLSL compute shaders and all particle information is stored in Shader Storage Buffers.
Particles are rendered using instance rendering. The SSBOs are shared between the compute shaders and the vertex shader so the only data that needs to be passed to the shaders each frame is some uniforms for the emitters information, all particle info remains on the GPU.
To enhance visuals I've added physically based bloom. After the deferred render pass and forward render pass have been combined, the result is run through two shaders to add the bloom effect. The first shader downsamples the image, and second up samples in combined with a blur. The resulting image is then combined with the original HDR colour buffer output.
The downsampling and upsampling of the output allows for similar results to running a series of larger kernels for the gaussian blur, but is much less expensive.
With a few exceptions (mainly transparent objects) all models are rendered with deferred rendering. The first pass omits lighting calculations and outputs colour, positions and normals. Lighting calculations are then done on a second pass thus limiting unnecessary work.
The depth buffer from the deferred pass and the forward rendered pass are then both sampled to allow the two to be combined correctly.
My engine is designed using an Entity Component System. I have implemented custom memory handling, with all entities stored in char* memory blocks. All entities of the same type are stored in contiguous memory allowing for improved cache locality.
Decals are added in screen space using a projection matrix. The decal is projected onto the output of the first rendering pass.
The decal is projected onto all fragments within the screen space and projection depth of the decal and perfectly conform to the underlying geometry.
My engine offers characted animation and allows for animation blending for smooth transitions between animations.
This is done by using linear interpolation to gradual transition the character between the current position and the starting position of the next animation over the desired amount of time.
Have any questions?
Feel free to ask!