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
-65Lines changed: 0 additions & 65 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,78 +8,13 @@ Mobile devices have significantly different hardware constraints compared to des
8
8
9
9
=== Texture Optimizations
10
10
11
-
To keep the workflow concrete and digestible, think of texture optimization in three steps:
12
-
13
-
1) Step 1: Ensure power‑of‑two (POT) dimensions (resize if needed)
14
-
2) Step 2: Pick a hardware‑compressed format supported by the device (ASTC → ETC2 → BC → fallback)
15
-
3) Step 3: Upload/update the Vulkan image and clean up staging resources
16
-
17
11
[NOTE]
18
12
====
19
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/).
20
14
====
21
15
22
16
Textures are often the largest consumers of memory in a graphics application. Optimizing them is crucial for mobile performance.
23
17
24
-
==== Power-of-Two Textures
25
-
26
-
One of the most important optimizations for mobile is using power-of-two (POT) texture dimensions (e.g., 256x256, 512x1024, etc.). Here's why:
27
-
28
-
1. *Hardware Acceleration*: Most mobile GPUs are optimized for POT textures and can process them more efficiently.
29
-
30
-
2. *Mipmapping*: POT textures are required for proper mipmapping, which is essential for performance and visual quality.
31
-
32
-
3. *Memory Alignment*: POT textures align better with memory pages, improving memory access patterns.
33
-
34
-
To ensure your textures are POT, you can implement a texture loading system that automatically resizes non-POT textures:
0 commit comments