arkavo-org / arkavo-org/VRMMetalKit

ASTC texture compression for MToon materials

Open
#359 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Swift
Stars
6
Forks
2
Avg merge
18h 51m
Merged PRs (30d)
26

Description

## Finding
All VRM textures are uncompressed RGBA8Unorm_sRGB. On Apple GPUs, ASTC reduces bandwidth and cache footprint by 4-8x with visually lossless quality. At 1024², `texture_read_cache` (50.3%) and `texture_read` (46.9%) are the top two GPU limiters.

## Context
- Source: QA GPU trace analysis, 1024² and 4K, branch c098f2d
- ASTC was the #1 limiter attack at 1024²; drops to secondary at 4K where fragment-launch dominates
- Still worthwhile for: low-res renders, distant/crowd LOD avatars, battery on iOS (less memory bandwidth)

## Approach
- Option A: Runtime ASTC compression at load time (trade CPU for GPU bandwidth — fits the MuseCore LLM-coexistence model since we have CPU headroom)
- Option B: Offline bake step in the content pipeline (preferred for shipped assets)
- Option C: `MTLPixelFormat.ASTC_*` via `MTKTextureLoader` if source textures are already ASTC-encoded in the glTF

## Scope
Content pipeline + loader change. No renderer changes needed (Metal handles ASTC transparently).

Contributor guide

Open the contributing guide

Research direction

Start by tracing the content pipeline and loader path for VRM glTF textures, then inspect how MTKTextureLoader handles source textures and Metal ASTC formats. Compare runtime compression, offline baking, and already-encoded ASTC input; done means MToon textures can use ASTC without renderer changes and the stated bandwidth goal is addressed.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
computer-graphics, mobile-dev, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.