Game Engine snippets for GED
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
karl e77dccb742 Update README with SPG stuff 2 years ago
.vscode Add unit tests instead of main; more implementations 2 years ago
Shader Remove duplicate shaders 2 years ago
cpp Add basic setup for shadow rendering 2 years ago
include Tessellation on the quad mesh works! 2 years ago
test Cleanup and complete keybindings 2 years ago
.clang-format Increase column width in clang-format 2 years ago
.gitignore Add *.os rule to gitignore 2 years ago
.gitmodules Add logging using spdlog 2 years ago
LICENSE Initial commit 2 years ago Update README with SPG stuff 2 years ago
SConstruct Preparations for tessellation: new demo + wireframe + new Shader types 2 years ago


Game engine snippets for the university course Game Engine Design (GED) with rendering functionality for Shader Programming (SPG).


Run scons in the root directory. This will generate two things:

  1. the shared library in lib/
  2. test binaries in test/bin/ which use the library created in step 1

Full Demo Binary

Among the generated test binaries is the full-demo.out which tests all SPG-related functionality:

  • 3D Texture: a volume is rendered using the Marching Cubes technique. Moving up and down offsets it vertically.
  • Bump Mapping: the ground texture is seemingly 3-dimensional thanks to bump mapping. 5/6 and 7/8 can be used to set the steps and refinement steps respectively. 9/0 sets the depth.
  • GPU Particle System: the fireworks can be positioned by clicking the ground. 1/2 changes the update rate interactively.
  • Soft Shadows: Variance Shadow Mapping smoothes out the shadows and prevents issues such as shadow acne.
  • Tessellation: demonstrated by the little quad with terrain on it. 3/4 sets the tessellation factor.

General input: WASD and mouse for movement, X to enable wireframe rendering.


The scons command also generates a compile_commands.json which can be used by the VSCodium extension clangd for autocompletion, debugging, etc.

Build and run scripts for VSCodium are provided as well.


Catch2 for unit tests:

Base structure inspired by TheCherno's Hazel Engine series:

Some shader-related code adapted from LearnOpenGL: