Skip to content

LiamSwarbrick/Projects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Projects

Liam Swarbrick, I write high quality software and do research.

Hiya, I'm a graphics engineer & systems programmer, currently contracting @ Huawei R&D UK where I'm researching and implementing mobile GPU algorithms, mostly novel gaussian splatting research that goes straight into mobile deployment.

At the University of Leeds, I got my masters (MEng/BSc) in Computer Science, specialising in High Performance Computer Graphics and Games Engineering.

I thrive on creating huge systems from the ground up, with highly scalable architectures that enable rapid development of high-performance software, and design qualities that enable teams to work together smoothly.

In my spare time I like to program things from scratch by hand, whether that be game engines, advanced rendering algorithms, indie games, computational geometry tools, compilers, or anything.

I also love drawing and painting :)

I've made some of my projects public to showcase: They go way back in time to leave a bread crumb trail of things I've been up to over the years.

My Projects - Table of Contents

TODO: Add KillSwitch Game Engine

Scalable Real-Time Polygonal Area Lighting (My BSc Thesis & Custom glTF2 Renderer) (2024/25)

"Endless Cinematic Area Lighting: Scalable Real-Time LTC Polygonal Lights with Clustered Forward Shading"

Software Delivered: Custom OpenGL 4.6 glTF2.0 Physically-Based scene renderer in C that supports thousands of polygonal area lights in real-time.

Development Time: November 2024 - April 2025

This project explores scalable real-time rendering of polygonal area lights using Linearly Transformed Cosines (LTCs) in a clustered forward shading pipeline. While LTCs make physically based polygonal lights efficient, they can only be used very sparingly in real-time applications, as they scale poorly with many light sources due to high computational cost per area light.

To address this, the system I developed performs both spatial and normal-space clustering for aggressive and accurate light culling. Unlike previous work where normal cones were too costly, this method demonstrates that they significantly improve performance for polygonal lights --- retaining distant specular reflections while supporting thousands of lights at interactive frame rates.

The system is implemented in a custom glTF 2.0 Physically Based Renderer that I made from scratch during the project. It's written in C with OpenGL 4.6 for Windows and Linux.

See below for a demo video of the renderer with 2000 polygonal lights across multiple instances of the UE4 Sun Temple model to see the scalability in large environments.

Read: 📄report/thesis - 📄source code
Demo video of 2000 Area Lights in 606,000 triangle scene (Diffuse Bounds): YouTube
Demo walkthrough of Light Cones for efficient specular in NormalxPosition Clustered Shading: YouTube

Future Research

If time allows, this project's is set to be developed further to get to an industrial standard, for instance, light assignment can be speedup massively using sparse clustering, and redeveloping the light assignment approach more soundly should make the algorithm more precise and avoid any edge cases as industry frowns upon edge cases greatly.

Progress screenshots of early versions during the development of the renderer:

2D Platformer Engine in C with Raylib (2023)

Tile editor Collision box from aseprite

  • Custom sprite animation and asset system integrated with the Aseprite pixelart program for a simple fun asset pipeline.
  • Integrated tilemap editor, serialising levels with json.

At some point I want to create a full length 2D story/platforming game this way to release on Steam since I love 2D indie games.

Link to the markdown page to read about it <-

Voxel Game in C with OpenGL 4.5 from scratch on the Win32API (2022)

Early screenshot from my voxel game

Voxel rendering with 3D chunking, texture arrays and mesh-culling optimisations. My 3D chunk storage allows infinite height worlds which opens up more interesting world generation possibilities - sky islands, planets, deep sea trenches, the possibilities are endless. At some point I'd like to explore this project more fully, e.g. a faster chunk hashing system, and unique world generation with the unlimited height axis.

Click here to peruse the source code if you also like some C programming.

Programmed so that the Windows API layer is straight forward to swap with a cross-platform library for Linux. Using no libraries was great for learning (hence not using GLFW). I implemented my own math library originally (which you can see here) but swapped it out for cglm since I was short on time and needed to trust the mathematical correctness immediately when debugging rendering errors, rather than rushing through math functions without thorough testing.

RenderDoc and OpenGL 4.5's debugging API were very useful for GPU debugging, which I needed to do a lot of, especially for building and uploading the mesh data of each voxel chunk.

Compiler for Java-like language 'Jack' written in C (2024)

Written in C using recursive-descent, compiling Jack source code into virtual machine code for the Hack computer. This was for University, receiving max marks.

My compiler's output for Nand2Tetris' Pong jack program

Godot-Wild Game-Jam Winner: My Precision Platformer for the theme "One Control" (2019)

For the theme of "One-Control", in just over a week I made an entry for the January 2019 Godot-Wild Jam #5!

Godot Wild Game Gif

My solo-entry was the result of 8-days of working in the Godot game engine (which has come a long way since 2019). I programmed a weighty one-control movement system, the physics feel responsive and precise as you build momentum. I had lots of fun drawing and animating the pixel art, and meticulously designed the levels perfectly around the mushroom player's movements, requiring skill and precision (taking up peoples afternoons to beat all the levels). I also had success with the sound design, respawn transitions, and adding fractal-brownian-motion fog for atmosphere.

Godot Wild Game feedback

Godot Jam Game screenshot

Godot Wild Game feedback

The community behind this jam was really great and gave lots of lovely feedback! (You can see it here on my entry page for the jam)

My Godot game that ran on the Nintendo Switch (2019)

For the 100-hour long Extra Credits Game Jam #3 (Feb 2019), I made a grapple hook game in the Godot Engine. I went for a game-boy style colour restriction since it was faster to make the assets that way in such a short time-span. Since 2019 to the time of writing this, it should still be on liamswarbrick.github.io, an updated version at least, which is slightly longer (but without the end screen) and slightly tighter controls than the original downloadable version.

Astro0 platformer gif

The Godot engine founder Ariel Manzur emailed me asking if I'd like to see a build on the switch, I quickly added gamepad and touch screen controls and was overjoyed to see it running since the Switch felt so new, I don't recall even seeing one in person at that point, The touch-screen controls were janky on there since I of course couldn't test it before sending a build over.

Astro0 on Nintendo Switch

Snippet of my older unfinished but of interest projects

I have many older and unfinished projects in all sorts of languages: Python, C#, Haxe, Rust etc. Here's some random examples...

Dual-Quaternion vertex skinning implementation I couldn't render (2020)

For my A-Level Computer Science project I went for a far too challenging project for my 16 year old self but it helped me so much more in the years to come than any boring project I could've finished.

I wrote an OpenGL 4.5 renderer that could load obj files, and I wanted to try skeletal animation. Naively after learning about the basics, I went straight to trying to implemented a more advanced technique from this paper "Skinning with Dual Quaternions" that used dual-quaternion transforms instead of matrices, and while I did learn a lot about skinning algorithms researching it. Once I had written a lot of C code for it (even doing premature optimisations like caching joint keyframes), I realised that I couldn't source assets with skeletal animations stored in such a format without writing a custom exporter for Blender. I now know better and would have just gone with the simpler algorithm until performance or rendering quality called for more.

See my implementation in the C header file skeletal_animation.h and the shader code rigged_mesh_vertex_shader.glsl.

Unfinished C Game-Boy Emulator (2019)

I was very interested in game console emulation, but never finished implementing all the instructions for the Game-Boy's processor. I'll definitely do some more emulator development in the future.

typedef u8 MMU[0xFFFF];

// cpu (Sharp LR35902 core @ 4.19 MHz, similar to the Z80)
typedef struct CPU
{
    union { struct { u8 f; u8 a; }; u16 af; };  // A, F
    union { struct { u8 c; u8 b; }; u16 bc; };  // B, C
    union { struct { u8 e; u8 d; }; u16 de; };  // D, E
    union { struct { u8 l; u8 h; }; u16 hl; };  // H, L
    u16 pc;  // program counter
    u16 sp;  // stack pointer

    MMU mmu;  // MMU used to map virtual addresses with physical addresses

    u64 t_clock;  // every machine cycle takes exactly 4 T states
    u8 delta_t_clock;  // cycles for last instrution
    
    struct
    {
        u16 mode;
        u16 mode_clock;
        u16 line;  // current scanline
    } video;
}
CPU;

C# Game drop-down console (2018)

Made in C# and Raylib, command processing was implemented after this old video, intended to be used for game debugging.

Other Games and Projects (2016-2018)

In these years I developed plenty of small games and programming projects in C#, Godot, and Python to name the most significant. For my early days of programming I was making small games in Python, mostly 2D games using the pygame library, and also a basic cube renderer using OpenGL 1's fixed function pipeline shortly after stumbling into Sentdex's tutorials series. I remember shortly after stumbling in awe upon things like "Minecraft in Python 2016 300 lines... (Classic Clone)" which set me forth on my graphics programming journey.

In C# I started learning the basics of modern OpenGL, with hobby projects that included texture mapping and point lighting. I was also a fan of XNA games so I made a few very unfinished 2D games in MonoGame.

Pre 2016

I was into game development with RPG-Maker VX Ace, peak internet era

My old released games on Itch: https://liam-swarbrick.itch.io/ (Creator Page) or https://itch.io/profile/liam-swarbrick (Profile)

When I found the Godot engine, I became hooked for a while on engine based game development, joining many game jams, participating in a lot of game development communities and making many small but finished games that other would play and give feedback on via my itch io page.

Most of my old projects are lost to time, or aren't worth listing here, given they date to when I was just starting to teach myself to program as a teenager.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages