The repository contains two (WIP) apps for now:
pbr: GLTF model viewer, with supports for most features from the GLTF PBR specgrass: A dense, real-time grassblade field simulation aiming to offload as much as possible to the GPU (terrain and grassblade generation, frustum culling and draw-call generation are all GPU-driven thanks to compute shaders)
- Minimal framework and collection of utilities to reduce boilerplate
- Support for HDR textures and cubemaps
- Support for KTX file format
- Image based lighting
- Multiple HDR post-processing shaders
- Generation of missing tangents and bitangents at runtime
The project uses CMake Presets for easy configuration:
mkdir build
cmake --preset rel-ninja # or `debug-ninja`/`debug-asan`
cmake --build --preset release # or `debug`/`asan`You can then run it:
build/rel-ninja/sdl_demos [APP_NAME]
Valid app names are pbr and grass.
The following libraries are expected to be installed system-wide:
- SDL3 (you can choose to build by defining the
BUILD_SDLCMake option) - glm
- simdjson (it's supposed to be fetched & built as a dependency of fastgltf, but it doesn't work for me)
These are built along with the project (make sure to clone submodules):
Use the shaders.sh script to build the shaders related to the app you want to run:
# TODO: add this as a CMake target someday
./shaders.sh grass
./shaders.sh pbr