diff --git a/crates/engine/src/eval/mod.rs b/crates/engine/src/eval/mod.rs index dc27455f01d30053b36de599f4ca9e09a9236a0d..0dfeed94a629fa2ab65b7b01c89b73880c3367d3 100644 --- a/crates/engine/src/eval/mod.rs +++ b/crates/engine/src/eval/mod.rs @@ -122,7 +122,6 @@ enum ShaderOp { VariBlur, OutlineTint, OutlineComposite, - TextOutline, #[allow(dead_code)] CustomWave, Crop, @@ -198,7 +197,6 @@ impl ShaderOp { | Self::FastNoise | Self::OutlineTint | Self::OutlineComposite - | Self::TextOutline | Self::CustomWave | Self::UltraKeyer | Self::Plasma => ShaderDomain::KeyersGen, @@ -233,7 +231,6 @@ impl ShaderOp { Self::VariBlur => "vari_blur_op", Self::OutlineTint => "outline_tint", Self::OutlineComposite => "outline_composite", - Self::TextOutline => "text_outline_op", Self::CustomWave => "custom_wave_op", Self::Crop => "crop_op", Self::GlowAdd => "glow_add_op", @@ -1406,7 +1403,7 @@ mod lazy_shader_verify { ShaderOp::FastNoise, ShaderOp::Displace, ShaderOp::MaskShape, ShaderOp::MaskCombine, ShaderOp::MaskApply, ShaderOp::BitmapMask, ShaderOp::Colorize, ShaderOp::ColorCurves, ShaderOp::XfChroma, ShaderOp::GamutConvert, ShaderOp::VariBlur, ShaderOp::OutlineTint, - ShaderOp::OutlineComposite, ShaderOp::TextOutline, ShaderOp::CustomWave, ShaderOp::Crop, + ShaderOp::OutlineComposite, ShaderOp::CustomWave, ShaderOp::Crop, ShaderOp::GlowAdd, ShaderOp::XGlowPrep, ShaderOp::XGlowAccum, ShaderOp::DisplayBlit, ShaderOp::Invert, ShaderOp::ChannelBoolean, ShaderOp::Filter, ShaderOp::HueCurves, ShaderOp::UltraKeyer, ShaderOp::Dissolve, ShaderOp::Homography, ShaderOp::ShadowComp, @@ -1422,9 +1419,9 @@ mod lazy_shader_verify { eng.pipelines_for(BitDepth::Float16).borrow_mut().ensure_pipeline(&eng.device, op); } assert_eq!(eng.pipelines.borrow().modules.len(), 7); - assert_eq!(eng.pipelines.borrow().pipelines.len(), 48); + assert_eq!(eng.pipelines.borrow().pipelines.len(), 47); assert_eq!(eng.pipelines_for(BitDepth::Float16).borrow().modules.len(), 7); - assert_eq!(eng.pipelines_for(BitDepth::Float16).borrow().pipelines.len(), 48); + assert_eq!(eng.pipelines_for(BitDepth::Float16).borrow().pipelines.len(), 47); } #[test] diff --git a/crates/engine/src/shaders/keyers_gen.wgsl b/crates/engine/src/shaders/keyers_gen.wgsl index 8d27c5c534a466f3313f471b41b6603b6739c4ae..21cd37cf1096b6a89abb31f8d824fc57e07da675 100644 --- a/crates/engine/src/shaders/keyers_gen.wgsl +++ b/crates/engine/src/shaders/keyers_gen.wgsl @@ -154,52 +154,6 @@ fn outline_composite(@builtin(global_invocation_id) gid: vec3) { store_dst(vec2(gid.xy), vec4(out_rgb, out_a)); } -// ============================================================================ -// 12c. TextPlus Circular Euclidean L2 Outline + Fill-Over-Outline Composite -// p[0] = (outline_r, outline_g, outline_b, outline_a) -// p[1] = (radius_px, 0, 0, 0) -// ============================================================================ -@compute @workgroup_size(8, 8) -fn text_outline_op(@builtin(global_invocation_id) gid: vec3) { - let dims = textureDimensions(dst_tex); - if (gid.x >= dims.x || gid.y >= dims.y) { return; } - let p = vec2(gid.xy); - let orig = textureLoad(src_a, p, 0); - if (orig.a >= 0.999) { - textureStore(dst_tex, p, orig); - return; - } - - let radius = clamp(u.p[1].x, 0.5, 28.0); - let r_int = i32(ceil(radius + 0.5)); - let r_max = radius + 0.5; - let r_max2 = r_max * r_max; - let max_p = vec2(dims) - vec2(1, 1); - - var max_a = orig.a; - for (var dy = -r_int; dy <= r_int; dy = dy + 1) { - let dy2 = f32(dy * dy); - for (var dx = -r_int; dx <= r_int; dx = dx + 1) { - let d2 = f32(dx * dx) + dy2; - if (d2 > r_max2) { continue; } - let sp = p + vec2(dx, dy); - if (sp.x < 0 || sp.y < 0 || sp.x > max_p.x || sp.y > max_p.y) { continue; } - let sa = textureLoad(src_a, sp, 0).a; - if (sa <= 0.0) { continue; } - // Subpixel Euclidean SDF dilation: partial glyph edge shifts boundary by (1 - sa) px - // without creating a 2-pixel soft outer halo that drops into ColorGain's DarkHue band! - let cov = clamp(radius - 0.5 + sa - sqrt(d2), 0.0, 1.0); - max_a = max(max_a, cov); - } - } - - let oa = max_a * u.p[0].a; - let outline_rgb = u.p[0].rgb * oa; - let out_rgb = orig.rgb + outline_rgb * (1.0 - orig.a); - let out_a = orig.a + oa * (1.0 - orig.a); - store_dst(p, vec4(out_rgb, out_a)); -} - // ============================================================================ // 13. Custom Wave Shader (matches `sin(x|y * w * n1 + n2 * n1 * w) * 0.5 + 0.5` per channel) // p[0] = (n1, n2, w_ref, 0)