shadowprobe

command
v1.3.0-rc.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2026 License: BSD-3-Clause Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command shadowprobe compares the software painter's canvas.BoxShadow with the GPU painter's, on the same canvas (#876). It shows opaque black shadows at three blur radii, with a corner radius and an offset, over white, then paints that one window canvas twice: through the window's GPU painter (Canvas.Capture), and through software.NewPainter. Every pixel inside the shadows' painted extents is compared.

go run ./hack/shadowprobe         # the default (WebGPU) painter
go run -tags gl ./hack/shadowprobe
BELLUI_SCALE=2 go run ./hack/shadowprobe

PASS: no channel differs by more than 10/255. Most of the difference is the GPU's: its blur approximates the Gaussian with a 9-tap kernel and halvings that internal/painter.PlanBlur documents as up to about a tenth of sigma off, while the software painter computes it exactly. The limit was 8, from that bound on a straight edge. At scale 2, 20 corner pixels of the blur-12 shadow differed by 9. There, a fine-grid integral of the Gaussian over the rounded rect gave grey 58.6: the software painter drew 58 and the GPU 67. So 10 is the GPU's own error at a corner. FAIL: anything more. Before #876 the software painter drew no shadow at all, so the difference was the whole shadow, 255 at its middle.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL