mirror of
https://github.com/storytold/filmcraft.git
synced 2026-10-26 11:06:58 -06:00
The GPU compositor uploaded only the Y, Cb and Cr planes of a Yuv8/Yuv16 frame and the shader returned alpha 1.0 for them, so a ProRes 4444 overlay (banner, lower third, outro) was drawn opaque in the Program monitor and covered the footage under it. Exports were correct because they use the CPU compositor. Frames with an alpha plane now upload it as a fourth texture (R8Unorm, or R16Float converted like the other planes), bound at binding 5 of the layer and blend layouts. A uniform slot (p3.y) carries the alpha scale (0 = no alpha plane); the shader reads the alpha at full resolution and premultiplies the linear colour by it. Adds gpu_draws_yuv_alpha_plane_like_the_cpu: an alpha ramp over an opaque layer at 8, 10 and 12 bits, GPU against the CPU compositor. It fails without the change (p99 diff 190/255) and passes with it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>