Under Construction

The Blog

Insights, tutorials, and stories from the world of software development.

Join my community?Contact to join
Unity
Jul 19, 2026

Understanding Static Batching and GPU Instancing

This article explains the performance problem of Draw Call in Unity and compares two common batching techniques: Static Batching and GPU Instancing. It describes how Static Batching combines static meshes into one large mesh at build time, making it fast but heavy on RAM and impossible to move, while GPU Instancing lets the GPU draw many copies of the same mesh with one Draw Call, using far less memory and allowing movement. The post also includes a comparison table, practical use cases, and pro tips on when to use each method, including direct rendering with Graphics.DrawMeshInstanced and Graphics.DrawMeshInstancedIndirect.

Minh Khoa
28 min
184
40
Unity
Jul 18, 2026

FixedUpdate If it runs stably, why not use it for all tasks?

FixedUpdate() keeps the physics simulation step stable, not the render frame rate, so it should not be used for every game task. The article explains why input, UI, camera, and animation belong in Update() or LateUpdate(), while physics work like Rigidbody movement belongs in FixedUpdate(). It also shows a simple pattern: read and store player input in Update(), then apply it to physics in FixedUpdate(), and warns about the spiral of doom when heavy logic is added to physics ticks.

Minh Khoa
18 min
126
45
AI
Jul 17, 2026

RAG Chatbot Deep Dive — Prometheus Lab

A deep dive into the Prometheus Lab RAG chatbot architecture, covering the full pipeline from offline indexing to online query handling: collecting data from portfolio pages, blog posts, and internal assets; splitting text into chunks with sanitization; generating 1536-dimensional embeddings with text-embedding-3-small; storing chunks in Supabase with zero-downtime atomic swaps; performing semantic search with pgvector and cosine similarity; streaming answers with NDJSON; and applying security measures such as prompt-injection protection, access control, rate limiting, validation, and output sanitization.

Minh Khoa
37 min
115
54
Unity
Jul 15, 2026

Why can one large Texture Atlas be much more optimized than many small textures?

This article explains why a large Texture Atlas can outperform many small textures in Unity: the main benefit is reducing texture/material state changes and improving batching, not automatically saving VRAM. It uses a simple GPU printing analogy, shows how atlases can cut draw call overhead, and notes that memory usage depends on packing, padding, mipmaps, and other settings. It also warns that an oversized atlas can backfire by increasing memory and load time, then gives practical advice for splitting atlases and a Unity checklist for testing with Frame Debugger and Memory Profiler.

Minh Khoa
18 min
240
41
Unity
Jul 14, 2026

Why do mobile apps often use ASTC 6x6 instead of 4x4 or 8x8?

This article explains why mobile games often use ASTC 6x6 instead of 4x4 or 8x8. It shows that a PNG’s file size does not reflect the final in-game texture memory, compares the quality and memory tradeoffs of ASTC 4x4, 6x6, and 8x8, and argues that 6x6 is a safe default because it balances image quality and compression. It also covers when to choose different settings by asset type, and points out that Max Size, mipmaps, and ASTC device support can matter even more than the compression ratio.

Minh Khoa
17 min
198
49
Unity
Jul 13, 2026

Multithreading in mobile games and builds WebGL how is it different?

This article explains how multithreading differs between Unity Mobile and WebGL builds. On Mobile, C# threads, Task.Run, and Job System can run normally, while Web 6.3 is effectively single-threaded for C# and only uses main-thread execution for non-Burst jobs. In Unity 6.4+, Burst-compiled C# Jobs can run on worker threads if the project and server are configured correctly, including the right Unity and Burst versions, Web Player settings, HTTPS, and required browser headers. It also clarifies that async, Coroutine, and Awaitable do not create real threads, and recommends when to use Jobs + Burst, frame-splitting, or main-thread work for different tasks.

Minh Khoa
20 min
171
55
Previous
Page 4 of 9
Next