Making games
Graphics and performance
The renderer
- Physically based materials (metallic-roughness, GGX), with normal, roughness, occlusion and emissive maps. glTF models bring their own materials.
- Shadows: three stable cascades from the sun, filtered (PCF).
- SSAO at half resolution for contact shadows in corners.
- Ambient light from the sky or skybox (spherical harmonics), reflections from the skybox's mip chain, and optional baked lighting.
- Height fog coloured by the sky, with sun in-scattering.
- Post-processing: HDR, bloom, eye adaptation, FXAA and a tonemapper per scene: ACES (filmic, punchy), AgX (natural highlights that don't shift hue) or PBR Neutral (true base colours).
Skies
A skybox is an equirectangular panorama: PNG / JPG (sRGB) or HDR. Five come with Ember in skies/:
day with clouds, clear desert, overcast, sunset and night. Drop an image on the sky in the viewport to
use it. With no skybox, a procedural sky is drawn from the zenith, horizon and ground colours.
Water
The Water component draws a body of water with four Gerstner waves (height, length, wind, choppiness), screen-space reflections with a sky fallback, depth-based refraction and absorption, shoreline and crest foam, sun glints and a subsurface tint. Things float on it.
Quality that fits the device
Project Settings > Quality > Auto (the default) reads the GPU and CPU when the game starts and picks a tier:
| Tier | Typical hardware |
|---|---|
| Potato | software rendering, old phones |
| Low | Intel UHD, mid-range phones, standalone VR |
| Medium | Iris Xe, Radeon integrated graphics, recent phones |
| High | GTX 1060-class, Apple M-series |
| Ultra | RTX 3060 / RX 6600 and up |
Machines with four or fewer CPU cores are capped a tier lower. The first seconds of play act as a benchmark: if the game misses the target frame rate even at the lowest resolution, it steps down a tier (at most twice). Tiers scale shadows, SSAO, bloom, FXAA, resolution and model detail distance.
Dynamic resolution renders the 3D scene at 50–100% to hold the target frame rate, and a sharpen pass restores detail. Every static model over 1,500 triangles gets two simpler LODs (about 50% and 20%) automatically. Players can change the tier in the pause menu, or with F4, unless you turn that off.
Measured on the showcase scene at 1280×720 with software rendering (2 cores): 233 ms per frame at High, 57 ms on Auto with dynamic resolution. A real GPU is much faster at every tier.
Shader cache
The first time a game runs on a computer it compiles its shaders and saves the compiled programs. Later launches load them instead, so the game starts faster.
- They're stored per game in the user's settings folder (
%APPDATA%\Ember\shadercache\<bundle id>on Windows). - A graphics driver update or an engine update recompiles automatically. A damaged cache file is detected and replaced.
- Project Settings > Quality > Shader cache shows how many programs came from the cache, with a
button to clear it. Setting the environment variable
EMBER_NO_SHADER_CACHE=1turns it off. - Drivers that can't save compiled programs (and web builds) simply compile at startup as before.
Lots of objects
Identical meshes are drawn in instanced batches (10,000 crates take about 60 draw calls), objects outside the view or shadow cascades are culled, and rendering interpolates between physics steps.