mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-30 21:16:52 -06:00
Exports converted the float frame to 8 bits by plain rounding, so a smooth gradient rendered at 16 or 32 bpc came out as flat bands, the same as at 8 bpc: raising the depth changed nothing visible. After Effects dithers colours converted to 8 bpc for render and export; do the same. - raster: dither_u8 and Image::to_rgba8_dithered / to_rgba8_over_dithered round each channel up or down against a hash of the pixel position with a fixed seed (deterministic, no clock or global RNG). A value already on an 8-bit code, as everything rendered at 8 bpc is, is unchanged. - export: Cx::pixels dithers the colour for every 8-bit output (stills, H.264, ProRes, HEVC, AV1, VP9); GIF keeps plain rounding (palette). - export: the Render Settings' Color Depth now overrides the project's depth for the whole render instead of only quantising the finished frame, so a 16 bpc render of an 8 bpc project keeps its precision. Tests: crates/export/tests/it/banding.rs (ramp export at 8/16 bpc and with Color Depth overrides), raster unit tests for dither_u8. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FYXhNN7W7nB6sKjwwU7CDM