From 6d99f68330b3732377cc5bdcf078ec0ffd8c8a27 Mon Sep 17 00:00:00 2001 From: sanyamsingh001 <314051937+sanyamsingh001@users.noreply.github.com> Date: Fri, 9 Oct 2026 23:03:05 +1000 Subject: [PATCH] G1: preserve GPU Posterize threshold parity Use an explicit FMA for the final quotient correction at Posterize boundaries. Align the kinetic motion-blur QA comparison with export settings and credit sanyamsingh001. Co-authored-by: Codex --- contributors/people.toml | 4 ++++ crates/automation/tests/qa/kinetic.rs | 2 ++ crates/gpu/src/shaders/fx_stylize.wgsl | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/contributors/people.toml b/contributors/people.toml index 5e120a33..1fef41b5 100644 --- a/contributors/people.toml +++ b/contributors/people.toml @@ -29,3 +29,7 @@ sync_github_name = false [people.jonassneu] sync_github_name = true + +[people.sanyamsingh001] +display_name = "sanyamsingh001" +sync_github_name = false diff --git a/crates/automation/tests/qa/kinetic.rs b/crates/automation/tests/qa/kinetic.rs index ddf66751..4cc81ef3 100644 --- a/crates/automation/tests/qa/kinetic.rs +++ b/crates/automation/tests/qa/kinetic.rs @@ -71,6 +71,8 @@ fn kinetic_typography() { // A precomp of everything, time-remapped to play backwards. let pre = qa.exec("layer.precompose", json!({"layers": ["Title", "Sub"], "name": "Type Pre", "mode": "move"})); assert!(pre["comp"].is_u64() && pre["layer"].is_u64(), "{pre}"); + // Nested switches pass the precomp layer's blur flag down to the animated title. + qa.exec("layer.setSwitch", json!({"layers": [pre["layer"].clone()], "switch": "motionBlur", "value": true})); qa.exec("layer.enableTimeRemap", json!({"layers": [pre["layer"].clone()], "value": true})); qa.tool("add_keyframe", json!({"layer": pre["layer"].clone(), "path": "timeRemap", "keys": [{"time": 0, "value": 1.9}, {"time": 1.9, "value": 0}]})); let fwd = qa.frame(Some(pre["comp"].clone()), 1.6); diff --git a/crates/gpu/src/shaders/fx_stylize.wgsl b/crates/gpu/src/shaders/fx_stylize.wgsl index 82ccbb57..b98c7474 100644 --- a/crates/gpu/src/shaders/fx_stylize.wgsl +++ b/crates/gpu/src/shaders/fx_stylize.wgsl @@ -40,7 +40,7 @@ fn fxs_smoothstep(e0: f32, e1: f32, x: f32) -> f32 { fn fxs_qdiv(x: vec3, a: f32) -> vec3 { let q = x / a; let r = fma(-q, vec3(a), x); - return q + r / a; + return fma(r / a, vec3(1.0), q); } fn fxs_rem2(i: i32) -> i32 {