Skip to main content

Module portal_load_textures

Module portal_load_textures 

Source
Expand description

PNG/KTX2 ingest for load_10d materials. Decode budgets are not the Prolog sentinel. PNG/KTX2 ingest for QualiaPortal load_10d materials.

Texture payloads stay outside .10d (HMC/deps). This helper turns caller- supplied encoded bytes into GPU RGBA, or skips when KTX2/BasisU transcode is refused. Decode budgets are caller-owned and separate from the 42 MiB Prolog/SlgArena sentinel.

Re-exports§

pub use crate::render::material_compile::compile_10d_pbr;

Structs§

DecodedPortalRgba8
Decoded tightly packed RGBA8 ready for GPU upload.
PackedPbrSet
Optional albedo + metallic-roughness PNG/KTX2 set for compile_10d_pbr.
PackedPbrTexture
Content-addressed encoded texture ready to bind onto a MAT3/MAT4 slot.

Enums§

PortalTextureError
PortalTextureIngest
Ingest outcome. Transcode-only KTX2/BasisU is skipped, never panicked.

Constants§

PORTAL_TEXTURE_DECODE_LIMITS
Portal image decode ceiling. Independent of the 42 MiB Prolog sentinel.

Functions§

detect_texture_mime
Identify PNG / JPEG / KTX2 from the file magic. No new container magics.
ingest_portal_texture
Decode PNG/JPEG/uncompressed KTX2 to RGBA8. BasisU/block KTX2 is skipped.
material_references_digest
True when digest occupies any MAT texture slot.
pack_pbr_set
Hash and signature-check encoded PBR maps. Payloads stay encoded (HMC-shaped).
upload_portal_texture_rgba8
Upload decoded RGBA into the TextureResidency ledger (not the Prolog sentinel).