General
Lithium is a 3D game engine for 64-bit Windows written in C++ and uses OpenGL as its low-level
rendering API.
The engine allows for modular development of a game meaning that programmers, texture artists,
modelers, mappers, etc. will see few conflicts in their project during development due to the
authoring tools provided by the engine and the modular design of the engine's internal code.
Complex scenes with many objects with high-quality lighting due to the deferred rendering pipeline,
LODs for objects in the scene, and other graphics pipeline optimizations.
Currently, the engine is undergoing a major refactor to improve the engine's design, performance,
and usability. This includes a new structure for how objects and behavior are handled and a suite
of commonly used data structures and behavior across the different engine modules and projects.
This includes a custom memory allocator, allowing both managed and unmanaged memory, custom
containers, and synchronization primitives. This refactor is aimed to be comleted somewhere
in mid-May. As a result of this refactor, some of the information below may become outdated as
structures are constantly in flux.
Update May 7, 2023 6:07 PM: Compiling shaders no longer crashes the program!
Update April 24, 2023 8:38 PM: No more compiler errors (or warnings) from the refactor!
Technical
- Runs on GPUs supporting at least OpenGL 4.0
- Deferred HDR rendering pipeline
- Physically-based lighting model
- Albedo
- Emissive
- Roughness
- Metallic
- Ambient Occlusion
- Normal
- Irrandiance
- Cascaded Shadow Mapping
- Postprocessing Support
- Bloom and Tonemapping
- Temporal Antialising (TAA)
- Fast Aproximate Antialiasing (FXAA)
- Screen-Space Reflections (SSR)
- Screen-Space Crepuscular Rays
- Screen-Space Ambient Occlusion (SSAO)
- Motion Blur
- Volumetric Lighting
- Unsharp masking
- Rendering pipeline optimizations
- Model and Terrain LODs
- Bounding-Volume Heirarchies and Frustum Culling
- Alpha-testing and ordered dithering
- Instanced rendering (on billboards)
- Texture compression
- C++ Scripting API
- Modular engine design
- Dynamic Resource System
- Can be controlled without modifying native code
- Supports hotloading, so any resource can be reloaded without needing to restart.
- Shader and Material System
- Material files bound to GLSL shaders
- Material parameters directly coorespond to GLSL uniforms
- Objects are not associated with shaders, but instead materials
- A scripting language to animate material parameters
- Authoring Tools
- ltfio - Author texture and cubemap files
- lmfutil - Author 3D models from common formats
- lpak - Create compressed resource archives
- lmapc - Compile map source files into a binary format
- runscript - REPL for material the scripting language
- liauth - Manage full Lithium projects
- Potato mode!
The engine uses Freetype 2, libpng, expat, zlib, and glad for third-party libraries.
The Windows API is used for all performance-critical areas of the engine, such as the the
window. A window is created manually using CreateWindowExA and its events are managed
manually to remove as much function call overhead as possible while still being fairly
easy to use by an end-user.
In the future, I may plan to switch to using my own cross-platform windowing system, mtgl,
which can be found on GitHub.