Filament
Thermion uses the Filament PBR package for much of the heavy lifting - rendering, materials, glTF, and so on.
Thermion is currently based on the v1.77.2 release of Filament (see
filament.version at the repository root).
Building your own materials
Section titled “Building your own materials”If you want to work with custom materials, you will need some basic knowledge of the underlying Filament library.
Things to keep in mind:
- Materials must be compiled against a Filament build with a matching material binary version. Filament’s material version is independent of the Filament release version, and not every release bumps it — so a material compiled for one release often still loads on the next.
- Thermion renders glTF assets through a single “uber” material archive (
.uberz) that is specialized at runtime via specialization constants (shading model, blending, and so on).
To rebuild the materials bundled with Thermion, from the repository root:
make materialsThis compiles the .mat sources under materials/ against your local Filament build (FILAMENT_PATH).
Animations when backgrounded
Section titled “Animations when backgrounded”Don’t call playGltfAnimation when the app is in the background (i.e. inactive/hidden). This will queue, but not start, an animation, and eventually this will overflow the command buffer when the app is foregrounded/resumed.
If you have a looping animation in your app code, make sure it pauses while the app is backgrounded.
Building Filament from source
Section titled “Building Filament from source”You normally don’t need to build Filament yourself — Thermion’s build hook fetches prebuilt binaries for every platform. If you’re modifying Thermion’s native code, see Web for building the WASM target locally.
