summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-10 11:27:39 -0300
committerGabriel Schneider <[email protected]>2026-11-12 13:22:02 -0300
commit00605f7a109845a99f16621b267305a8b995dddc (patch)
tree223c7f89506279b4129f5592ece782b306f2eda3 /src
parent86ffca0024326110962f0880727f4eb84e6a48d1 (diff)
downloadsketchbook-00605f7a109845a99f16621b267305a8b995dddc.tar.gz
sketchbook-00605f7a109845a99f16621b267305a8b995dddc.zip
sketchbook: shapes antialiased up to 3840x2160; SDL's Vulkan backend no longer defragments (it lost a frame's first draws)
Co-Authored-By: Claude Fable 5.2 <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/host/gfx.zig7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/host/gfx.zig b/src/host/gfx.zig
index 3affa6e..0466f27 100644
--- a/src/host/gfx.zig
+++ b/src/host/gfx.zig
@@ -180,9 +180,10 @@ pub const Painter = struct {
dirty: [4]u32 = .{ 0, 0, 0, 0 },
};
- /// 16 samples a pixel, unless that takes more than 16 Mi of them; 4,
- /// then; else none.
- const max_samples = 16 << 20;
+ /// 16 samples a pixel, unless that takes more than a 3840x2160 canvas
+ /// does at 4 (what 1920x1080 takes at 16: a 127 MiB layer); 4, then;
+ /// else none.
+ const max_samples = 3840 * 2160 * 4;
fn factorFor(size: [2]u32) u32 {
const pixels = @as(u64, size[0]) * size[1];