donmccurdy / glTF-Transform

glTF 2.0 SDK for JavaScript and TypeScript, on Web and Node.js.
https://gltf-transform.dev
MIT License
1.39k stars 149 forks source link

Rename "GPU memory size" to "Min GPU memory size" #197

Closed lexaknyazev closed 3 years ago

lexaknyazev commented 3 years ago

Rationale:

  1. When compressed transcode targets are not available, KTX textures will be decoded to RGBA8 thus matching the uncompressed size (the same as PNG / JPEG).
  2. On desktop platforms, opaque ETC1S may be transcoded to BC7 that uses 16 bytes per block.
donmccurdy commented 3 years ago

Since this column name also applies to PNG/JPG textures, and the GPU memory size estimates there are assuming expansion to RGBA8, wouldn't a "minimum" size need to be lowered for PNG/JPG? I guess the alternative would be something like "estimated GPU memory size"?

lexaknyazev commented 3 years ago

"Estimated" is too vague, but I don't have any better proposals.

donmccurdy commented 3 years ago

Updated output, example below:


TEXTURES ──────────────────────────────────────────── # name uri slots instances mimeType resolution size gpuSize¹
0 baseColor.ktx2 baseColorTexture 1 image/ktx2 512x512 123 KB 456 KB

¹ gpuSize estimates minimum GPU memory allocation. Older devices may require additional memory for GPU compression formats.