File size is not GPU size
Real file sizes and pixel sizes of the course's textures, then the formula for common sizes. The last line is 300 × 200: odd sizes work, and cost what the formula says. A mipmap chain is about one third more (the exact value for odd sizes differs slightly).
A texture costs width × height × 4 bytes on the GPU, plus a third for mipmaps, whatever its file size. renderer.info.memory.textures counts them, and dispose() frees them.
Change the code and press Run (Ctrl+Enter). Predict what will happen first, then break it on purpose and read what changes. Your edits are saved and match the lesson page.
Ready for more? This phase has 4 hands-on exercises with automatic checks.
Practice questions
Write the code in the editor, run it, then open the model answer to compare.
Your showroom uses 12 textures of 2048 × 2048 with mipmaps. What is the total, and is it a problem?
Write the code that changes a mesh's colour map and frees the old one.
Explain it without notes
A texture is a 300 KB JPEG at 2048 × 2048. How much GPU memory does it take, and how do you cut it?
What does renderer.info.memory.textures tell you, and what does it not?
Console
Nothing logged yet.Expected console output
file on disk on the GPU
metal_plate_diff_1k.jpg 676 KiB 5.3 MiB
metal_plate_nor_gl_1k.jpg 752 KiB 5.3 MiB
rubber_tiles_diff_1k.jpg 343 KiB 5.3 MiB
concrete_floor_02_diff_1k.jpg 758 KiB 5.3 MiB
512 x 512 1.00 MiB without mipmaps | 1.33 MiB with
1024 x 1024 4.00 MiB without mipmaps | 5.33 MiB with
2048 x 2048 16.00 MiB without mipmaps | 21.33 MiB with
4096 x 4096 64.00 MiB without mipmaps | 85.33 MiB with
300 x 200 0.23 MiB without mipmaps | 0.31 MiB with