3D OpenGL

BUAS Block B Project

Project

For BUAS block B we needed to recreate a metal gear solid style game in OpenGL on the raspberry pi (4)

I chose to go deeper in some techniques like parallax adjusted cubemap reflections and particles.


I received a 100/100 grade for this project

Reflections

One of the main features I added to the project was parallax adjusted cubemap reflections,

I added reflectionprobes to the level which took cubemap pictures on level load.

I then displayed these using a shader which mapped the cubemaps with perspective adjustement to make them look more real.


It works by moving the cubemap through the surface and doing a ray box intersection to sample the cubemap, this makes it look like the room is behind the surface and then i flip the map accordingly

Particles

I also wanted (loads) of particles in my game, so I added support for particles.

I made the particles run on the GPU as a compute shader and draw them instanced, This allows me to keep the data on the GPU saving long transfer times and runs very fast.


However I ran into a big problem because the raspberry pi doesnt support data buffers for compute shaders, To solve this I put all the data into a single channel texture which allowed me to also run this on the PI

Water

I also added water to my game, using perlin noise generated geometry and a depth based shader.

Nav meshes

For enemies I added navmesh navigation using A*,

the navmeshes werent automatically generated but could be loaded from a model file.

Game page