You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: en/Building_a_Simple_Engine/Mobile_Development/03_performance_optimizations.adoc
+61-46Lines changed: 61 additions & 46 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,22 +13,27 @@ Mobile devices have significantly different hardware constraints compared to des
13
13
We focus on mobile‑specific decisions here. For general Vulkan image creation, staging uploads, and descriptor setup, refer back to earlier chapters in the engine series—link:../Engine_Architecture/04_resource_management.adoc[Resource Management], link:../Engine_Architecture/05_rendering_pipeline.adoc[Rendering Pipeline]—or the Vulkan Guide (https://docs.vulkan.org/guide/latest/).
14
14
====
15
15
16
-
Textures are often the largest consumers of memory in a graphics application. Optimizing them is crucial for mobile performance.
16
+
Textures are often the largest consumers of memory in a graphics application. Optimizing them is crucial for performance on both mobile and desktop.
17
17
18
18
==== Efficient Texture Formats
19
19
20
-
Choosing the right texture format is crucial for mobile performance:
20
+
Choosing the right texture format is crucial across platforms; what differs is which formats are natively supported by a given device/driver:
21
21
22
22
1. *Compressed Formats*: Use hardware-supported compressed formats whenever possible:
23
-
- *ASTC* (Adaptive Scalable Texture Compression): Widely supported on modern mobile GPUs, offers excellent quality-to-size ratio with flexible block sizes.
24
-
- *ETC2/EAC*: Required for OpenGL ES 3.0 and supported by most Android devices.
23
+
- *ASTC* (Adaptive Scalable Texture Compression): Widely supported on modern mobile GPUs and increasingly available on desktop; excellent quality-to-size ratio with flexible block sizes.
24
+
- *ETC2/EAC*: Required for OpenGL ES 3.0 and supported by most Android devices; commonly available on Vulkan stacks, too.
25
25
- *PVRTC*: Primarily supported on iOS devices with PowerVR GPUs.
26
-
- *BC* (Block Compression): More common on desktop but supported by some high-end mobile GPUs.
26
+
- *BC* (Block Compression, a.k.a. DXT/BCn): Ubiquitous on desktop; supported by some mobile GPUs.
27
27
28
-
2. *Format Selection Based on Content*: Choose formats based on the type of texture:
29
-
- Use ASTC 4x4 or 6x6 for normal maps and detailed textures.
30
-
- Use ASTC 8x8 or 12x12 for diffuse/albedo textures.
31
-
- Consider using R8 for single-channel textures like height maps.
28
+
2. *Format Selection Based on Content and Support*: Choose formats based on the type of texture and what the device reports:
29
+
- For high detail (normals, roughness): prefer ASTC 4x4 or 6x6 when supported; on desktop, BC5/BC7 are common alternatives.
30
+
- For albedo/basecolor: ASTC 6x6–8x8 works well when available; on desktop, BC1/BC7 are typical.
31
+
- For single-channel data: consider R8 or compressed single-channel alternatives when available.
32
+
33
+
[NOTE]
34
+
====
35
+
This guidance is not mobile-only: block compression reduces memory footprint and bandwidth on all platforms. The Mobile chapter highlights it because bandwidth and power are tighter constraints on phones/tablets. On desktop, the same benefits apply; the primary difference is which formats are commonly available (e.g., BC on desktop, ASTC/ETC2 on many mobile devices).
36
+
====
32
37
33
38
Here's how to check for and use compressed formats in Vulkan:
0 commit comments