Files
Kalulu/assets/bush_curtain.png.import
Adrien Ufferte 896e2740b3 Compress large textures to VRAM formats and enable 2D mipmaps
All 747 imported PNGs were imported losslessly (compress/mode=0) without
mipmaps. Lossless textures are decompressed to raw RGBA8 in GPU memory,
so the big gameplay assets were extremely expensive: the 4100x2448
bush_curtain alone used ~40 MB of VRAM, and the 6400x8001 minigame
spritesheets ~205 MB each. Summed over the affected files, the
worst-case footprint was ~2.4 GB of texture memory for a game that
targets low-end 1-2 GB tablets with the gl_compatibility renderer. The
absence of mipmaps also caused shimmering and wasted bandwidth whenever
these textures were drawn below their native size, which is almost
always the case with the 2560x1800 canvas_items stretch.

- Switch the 119 textures with a dimension >= 512 px to VRAM
  compression (compress/mode=2) with generated mipmaps. The project
  already enables etc2_astc import, so mobile gets ETC2/ASTC and
  desktop gets S3TC/BPTC. The total footprint for these textures drops
  from ~2.4 GB raw RGBA8 to ~770 MB including mipmaps (~3x smaller
  resident set, plus faster texture uploads).
- Keep small UI textures (< 512 px, 626 files) lossless: their VRAM
  cost is negligible and block-compression artifacts would be most
  visible on small crisp UI art.
- Set the default 2D texture filter to Linear Mipmap so the generated
  mipmaps are actually sampled by canvas items (without this, mipmap
  generation would only add memory).
- Remove viewport/hdr_2d=true: HDR 2D allocates RGBA16F framebuffers,
  doubling framebuffer memory and bandwidth at 2560x1800 on exactly the
  GPUs that can least afford it. No scene uses glow or HDR values (no
  WorldEnvironment anywhere), so this was pure cost. As false is the
  default value, Godot drops the line entirely.

Texture quality should be eyeballed in the editor on the largest
illustrations; any texture where compression artifacts are noticeable
can be switched back to lossless individually.

Verified with the GUT test suite (62/62 passing).
2026-06-11 08:45:57 +02:00

43 lines
1.2 KiB
Plaintext

[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cop8iscyxohrb"
path.s3tc="res://.godot/imported/bush_curtain.png-2e1fb82bc0153666dd15620ed6cf9a14.s3tc.ctex"
path.etc2="res://.godot/imported/bush_curtain.png-2e1fb82bc0153666dd15620ed6cf9a14.etc2.ctex"
metadata={
"imported_formats": ["s3tc_bptc", "etc2_astc"],
"vram_texture": true
}
[deps]
source_file="res://assets/bush_curtain.png"
dest_files=["res://.godot/imported/bush_curtain.png-2e1fb82bc0153666dd15620ed6cf9a14.s3tc.ctex", "res://.godot/imported/bush_curtain.png-2e1fb82bc0153666dd15620ed6cf9a14.etc2.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1