M12.7: GPU blur/transition/generate effects (radial, camera lens, CC radial fast, wipes, venetian, cell pattern, checkerboard, grid, 4-color, noise, add grain)

Kernels in fx_generate.wgsl mirror the CPU effects; wipe edges use f64
per-column/per-row terms uploaded as (hi, lo) pairs. CPU helpers shared
with the GPU are now public (camera_lens_spans, gen_mode, pattern_kind,
GrainLook, place_layer). GPU tests in tests_fx_generate.rs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon Thomas
2026-10-03 02:46:09 -04:00
co-authored by Claude Opus 5.5
parent 9a6389db86
commit c8623b1864
11 changed files with 1275 additions and 32 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ fn scale_px(px: &mut Px, k: f32) {
/// Resample `other` into `b`'s pixel grid with placement `mode` (Gradient Wipe's Gradient
/// Placement, Texturize's Texture Placement): 0 tile from the top-left, 1 centre once,
/// 2 stretch to fit.
pub(crate) fn place_layer(ctx: &EffectCtx, b: &Buf, other: &crate::LayerPixels, mode: u32) -> effectcraft_raster::Image {
pub fn place_layer(ctx: &EffectCtx, b: &Buf, other: &crate::LayerPixels, mode: u32) -> effectcraft_raster::Image {
let (ls, os) = (ctx.layer_size, other.size);
let inv = 1.0 / b.scale.max(1e-9);
crate::util::gen_image(b.img.width, b.img.height, |x, y| {