Raster images: transparency off draws pixels opaque; TRANSPARENCY command

An image's transparency flag decides whether transparent pixels show what
is behind the image or draw in their stored colour: the image pass and PDF
plots now follow it (it was ignored, so every PNG alpha showed through).
TRANSPARENCY selects images and asks for the mode, defaulting to the first
image's current one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ramox81andClaude Opus 5.5 committed 2026-09-28 11:23:19 +03:00
1 parent 801882314f
commit 5ca7becd97
30 files changed
+237 -6

No files matched your search

+5 -2
View File
@@ -79,7 +79,9 @@ struct ImageParams {
/// Signed draw-order depth (-1,1); applied as a clip-z bias in the shader
/// so the raster orders against other entity types. 0.0 = neutral.
draw_depth: f32,
_pad: [f32; 2],
/// 1.0 when pixel alpha applies, 0.0 when pixels draw opaque.
use_alpha: f32,
_pad: f32,
} // 16 bytes
// ── Per-image GPU handle ──────────────────────────────────────────────────
@@ -196,7 +198,8 @@ impl ImageGpu {
let params = ImageParams {
opacity: model.opacity.clamp(0.0, 1.0),
draw_depth: 0.0,
_pad: [0.0; 2],
use_alpha: if model.use_alpha { 1.0 } else { 0.0 },
_pad: 0.0,
};
let params_buf = Arc::new(super::gpu_upload::upload_buffer(
device,