Repository navigation
feat(bc5): inset-partition seed, regression refit, offset round - #14
Merged
Merged
Conversation
BC5 quality up 3.8–60% lower MSE on every real texture at GPU parity (f16 +0.6% within timer noise, f32 −1.1%), all three backends. - Pass-1 levels are assigned against the min/max range inset by ~5.5/256 of the span (scale ×7.3125/7, offset 11/32 — exact dyadic constants), so the extreme levels gather every pixel near the extremes, not just the extreme pixel; the refit lands far closer to the optimum (exhaustive endpoint search showed the plain bbox seed leaving 0.7–6 dB). - Spans ≤ 7 (incl. flat blocks) seed a 7-wide window: lossless. - Refit is the plain least-squares line off the pass-1 moments (~12 ops per channel), accepted whenever it stays in 6-interp mode — the E(δ) pricing changed nothing on the inset partition and its cost pays for: - Offset round: both endpoints shift by the rounded mean residual of the shipped levels (only ΣL is new in pass 2, now a loop over quads); never worse on those indices under any decoder's weights. Hardware-decoded (/eval, M3): normals −3.8..−6.3% MSE, colour/roughness/ AO/packed −3.8..−9%, displacement −9..−60%; synthetic normal card −2.9% (−4.8% CPU-decoded). WebGL GLSL byte-identical to the f32 WGSL (13 images incl. odd sizes and flipY). /test BC5 pins raised; 0 failures. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
BC5 error is 3.8–60% lower (MSE) on every real texture, and GPU time is unchanged. All three backends are updated: f16 WGSL, f32 WGSL and WebGL GLSL.
Changes
Results
Measured on /eval (M3, hardware-decoded quality, interleaved timing):
Notes
🤖 Generated with Claude Code