src/shaders/candidate{Filters,Inputs,Temporal,Debug}.ts — ~55 kB of source, mostly WGSL string literals that survive minification — is statically imported by Upscaler.ts and therefore ships in dist/index.js (currently 188.84 kB). These are parity-research bundles from the FSR 3.1.5 A/B program; no library consumer can reach them.
They are gated behind the private _candidateBundle config option, and the only thing that ever sets it is the bench (bench/src/benchmark/BenchmarkResolver.ts:43). Because the import is static and the branch is a runtime string compare, no bundler can drop them.
Why it isn't a one-liner: Upscaler.ts branches on _candidateBundle in ~15 places, selecting shader sources and pass structure (the structural bundle changes the graph, not just the WGSL). Removing the import means introducing a seam.
Approach options:
- Turn
_candidateBundle into a shader/pass-source injection object the bench supplies, and move the candidate modules to bench/src/shaders/. The bench already aliases @pmndrs/upscaler → ../src/index.ts (bench/vite.config.ts:10), so it can inject without a published entry point.
- Ship them behind a secondary entry (
@pmndrs/upscaler/candidates) that registers into the core. Keeps them installable but off the main path.
- Delete from
src/ outright and keep the A/B rig reconstructable from git history (1b1be7b).
Option 1 is preferred — it keeps node scripts/run-benchmark.mjs --variant <A> --comparison <B> working, which the parity record depends on.
Acceptance:
dist/index.js contains no candidate WGSL (grep for a distinguishing candidate-only identifier); record the size delta.
- Candidate A/B runs still work for all four bundle IDs.
npm test && npm run typecheck && npm run lint && npm run build clean; production capture output byte-identical (Q0/Q1/Q3) — this touches a core path, so it needs GPU re-verification, not just a green build.
Risk note: this edits the core pass-construction path. It was deliberately not bundled into the 0.2.0 PR (#1) for that reason. Do it early in a release cycle, not right before a publish.
src/shaders/candidate{Filters,Inputs,Temporal,Debug}.ts— ~55 kB of source, mostly WGSL string literals that survive minification — is statically imported byUpscaler.tsand therefore ships indist/index.js(currently 188.84 kB). These are parity-research bundles from the FSR 3.1.5 A/B program; no library consumer can reach them.They are gated behind the private
_candidateBundleconfig option, and the only thing that ever sets it is the bench (bench/src/benchmark/BenchmarkResolver.ts:43). Because the import is static and the branch is a runtime string compare, no bundler can drop them.Why it isn't a one-liner:
Upscaler.tsbranches on_candidateBundlein ~15 places, selecting shader sources and pass structure (the structural bundle changes the graph, not just the WGSL). Removing the import means introducing a seam.Approach options:
_candidateBundleinto a shader/pass-source injection object the bench supplies, and move the candidate modules tobench/src/shaders/. The bench already aliases@pmndrs/upscaler→../src/index.ts(bench/vite.config.ts:10), so it can inject without a published entry point.@pmndrs/upscaler/candidates) that registers into the core. Keeps them installable but off the main path.src/outright and keep the A/B rig reconstructable from git history (1b1be7b).Option 1 is preferred — it keeps
node scripts/run-benchmark.mjs --variant <A> --comparison <B>working, which the parity record depends on.Acceptance:
dist/index.jscontains no candidate WGSL (grep for a distinguishing candidate-only identifier); record the size delta.npm test && npm run typecheck && npm run lint && npm run buildclean; production capture output byte-identical (Q0/Q1/Q3) — this touches a core path, so it needs GPU re-verification, not just a green build.Risk note: this edits the core pass-construction path. It was deliberately not bundled into the 0.2.0 PR (#1) for that reason. Do it early in a release cycle, not right before a publish.