Textures
The engine decodes image files with stb_image and uploads them as RGBA8 textures. It builds a mip chain from the base image when the texture loads. There is no block-compressed texture format and no separate packing step.
Supported formats
Section titled “Supported formats”| Format | Notes |
|---|---|
| PNG | Good default. Keeps sharp edges and alpha |
| JPEG | Small for opaque photos, no alpha |
| WEBP | Small, supports alpha |
| BMP | Uncompressed, large |
| TGA | Common DCC export |
| GIF | First frame only |
| QOI | Simple lossless format |
Anything stb_image reads also works. The engine does not enforce file names.
Where textures are used
Section titled “Where textures are used”| Use | Set it in |
|---|---|
| Material texture slots | Material component / Material Editor |
| Sky background | Scene Settings -> Sky / Environment |
| In-game UI images | UiImage component |
The sky uses a 2:1 equirectangular image. Material slots take any of the formats above.
Mipmaps
Section titled “Mipmaps”The engine generates a mip chain from the source image at load:
- Albedo mips average in linear light when the source is sRGB.
- Normal maps stay linear and are renormalized per texel.
- An image whose width or height is 1 stays at the base level.
You do not author mips. You do not choose a compression format. Provide the source image and the engine builds what it needs.
Color space
Section titled “Color space”A material texture slot decides how the GPU reads the bytes:
| Slot | Store the pixels as |
|---|---|
| Albedo, emission, sky | Ordinary sRGB, the way the picture looks in the editor |
| Normal, roughness/metallic/AO | Linear. Gamma off, so a mid-gray value stays 128 |
Export albedo, emission, and sky with gamma on, so the file matches the picture in the editor. Export normal and the roughness/metallic/AO map with gamma off.
RMA channel order
Section titled “RMA channel order”When you pack roughness, metallic, and ambient occlusion into one image, use this order:
| Channel | Content |
|---|---|
| R | Roughness |
| G | Metallic |
| B | Ambient occlusion |
| A | Transmission (0 = opaque, higher = more light through the surface) |
Pack it in any image editor and save as PNG.
Rules of thumb
Section titled “Rules of thumb”- Use PNG for color maps with detail or alpha. Use JPEG or WEBP for large opaque photos to keep project size down.
- Use the same channel packing every time so maps stay predictable.
- Albedo should not contain baked lighting. Tileables should be seamless.
- Do not reuse one image for both albedo and normal with different sRGB expectations. Duplicate the file if needed.
Common mistakes
Section titled “Common mistakes”| Symptom | Likely cause |
|---|---|
| Normal too glossy | sRGB export on a normal or RMA map |
| Dark or washed albedo | Wrong gamma, or linear data in an sRGB slot |
| Wrong roughness / metal | RMA channels swapped or not packed together |
| Soft UI image | Source image is low resolution and scaled up |
Continue reading
Section titled “Continue reading”Previous: Pipeline: zero-import workflow.
Next: Meshes: GLB paths and material slots.
