ludic/changes/bake-images.md
Orkuncakilkaya 3f2723582f render3d: an impostor's bake is BC7 with its mips - both atlases uploaded compressed, as baked
impostor_from_baked / impostor_refill read a bundle of two DX10 .dds (albedo, normal: BC7_UNORM, every
level) through tex_load_dds_at and gpu_tex_compressed - no gpu_tex_mips - and check each is the
impostor's size; sampled as a painted atlas is (clamped, no anisotropy). No BC on the GPU, or a bake
that does not fit, and the caller paints RGBA8 and makes mips as before; the fog re-open reads the BC7
file again. The handles and every draw are unchanged. Compile-only: nothing run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-29 19:18:48 +03:00

1,015 B

bump: minor type: feature Bakes you can look at, and three more of the renderer's textures read from one. ludic.lab writes raw 8-bit pixels (1 to 4 channels) as a PNG (lab_png_write, png_write.ludic, importable alone with its own LabPngState) and turns float textures into honest previews (png_convert.ludic: R32F min..max as grey, RG16F as red and green x255, HDR RGBA16F as x/(1+x) then sRGB). ludic.render3d takes three bakes the game names (bake_load.ludic) and makes each as before when one is missing or stale: an impostor's atlases as BC7 with their baked mips, through the compressed upload (impostor_from_baked, impostor_fill_bc7; a fog opening past its cards reads the bake again instead of painting), the sky's image-based light at the start yaw per prefilter width (sky_baked_in; any other turn of the sky is convolved), and the grass carpet (carpet_from_baked, carpet_bytes). impostor_from_bytes returns null, keeping nothing, when the bytes are not the impostor's shape.