Skip to content

fix(desktop): prefer an 8-bit surface format; a float one shows everything washed out on Linux - #94

Open
zednaked wants to merge 1 commit into
artcraft-android:mainfrom
zednaked:fix/surface-8bit
Open

zednaked wants to merge 1 commit into
artcraft-android:mainfrom
zednaked:fix/surface-8bit

Conversation

@zednaked

@zednaked zednaked commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Problem

On Linux (Wayland, Vulkan: Mesa RADV and NVIDIA 615), the whole window shows washed out in the dark interface. The surround that SURROUND sets to #252525 shows as #6A6A6A on screen (measured with grim), and the bars and side bar are lifted the same way.

frame::configure takes the first non-sRGB format the surface offers. Through wgpu, that is Rgba16Float on these drivers (log: surface 1920×1080 Rgba16Float Mailbox Auto). The compositor reads a float surface as linear, but the colours drawn on it are already sRGB-encoded. 37/255 read as linear shows as 106/255, which is exactly what's on screen.

Fix

Prefer Bgra8Unorm, then Rgba8Unorm, where the surface offers them, and fall back to the old choice otherwise. They are still non-sRGB formats, so nothing is re-encoded, as the function's comment asks.

Checked

  • Built v0.0.4-beta with only this change (same diff) on Arch, Hyprland, AMD Renoir (RADV). The log now shows Bgra8Unorm, and the surround measures exactly #252525 on screen.
  • cargo check -p procraft-core and cargo fmt --check pass on main.
  • I couldn't test macOS or Windows. There, the order only changes if the surface offers an 8-bit format after a float one.

🤖 Generated with Claude Code

…e showing the interface and canvas washed out

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant