Custom Graphics Renderer
Here is some progress pictures from a graphics renderer project that I was working on a year ago while learning graphics programming. I was mainly focused on OpenGL, but the idea was to write a general graphics/game engine and add a Vulkan API support for it too.
Testing mesh repeater settings
Testing instancing ( copying all vertex data to GPU and drawing only once )
Modifying individual mesh properties in a mesh grid
The idea here was that each mesh, or an object would have this 'repeater' setting built in, so that they could be copied to all directions, add padding, rotating and scaling them individually just changing the configs.
Implemented the Phong lighting model, which consists of different components; ambient, specular and diffuse lighting. These are all calculated in the fragment shader.
Here are different types of lights:
Directional lights ( diffuse )
Multiple different lights
Multiple point lights
Testing terrain generation with berlin noise
Something's not right
At this point the test code base structure was getting a bit out of hand and I decided to start designing a little bit how it would work better. I was thinking that the renderer would work as an 'engine' library, separately from the game or other use case. I also moved to a ECS ( Entity Component System ) based system, which optimizes the CPU cache for handling the data. I also started to think about how to abstract the graphics API so that Vulkan API could be added later on to the engine.