rememberKtxEnvironment
Loads an IBL environment (and optional skybox) from KTX1 data, e.g. the pair Filament's cmgen bakes. Returns at once; the Environment's parts fill in as the data decodes. Failures (a loader throwing, or undecodable KTX) are reported once via onError and leave that part null.
Like the other loaders, call it inside rememberFilamentScene { }, or outside with a hoisted engine to share one environment between scenes.
For raw equirectangular .hdr images (no offline bake) use rememberHdrEnvironment.
Parameters
Reloads when this changes. Defaults to Unit for static assets.
Invoked once per failure (load threw, or the KTX failed to decode).
Engine the textures are allocated on. Defaults to the engine in the current composition scope, which only exists inside rememberFilamentScene { }.
Optional loader for the skybox cubemap KTX. Null = lighting only, no background.
Loader for the IBL KTX (prefiltered reflection cubemap + irradiance harmonics).