egui/crates
Emil Ernerfeldt 0a40b16bd4
Fix blurry rendering in some browsers (#4299)
* Closes https://github.com/emilk/egui/issues/4241

I would love some more testers of this.

I'm not sure if we really need the round-to-even code, but I'm hesitant
to out-right revert https://github.com/emilk/egui/pull/151 when I cannot
reproduce its problem. Keeping it seems quite safe though.

---
# Testing
Checkout the branch and run:

* `./scripts/start_server.sh`
* `./scripts/build_demo_web.sh` and then open
`http://localhost:8888/index.html#Rendering`
* `./scripts/build_demo_web.sh --wgpu` and then open
`http://localhost:8888/index.html#Rendering`

Check the "Rendering test" that the squares in the pixel alignment test
are perfectly sharp, like this:

<img width="576" alt="Screenshot 2024-04-01 at 13 27 20"
src="https://github.com/emilk/egui/assets/1148717/fb6c4824-9e25-4304-bc0c-3c50fbd44a52">

If it looks something like this, something is WRONG:
<img width="488" alt="Screenshot 2024-04-01 at 13 29 07"
src="https://github.com/emilk/egui/assets/1148717/04bd93ff-2108-40c5-95f6-76e3bcb9cd7f">


Please try it on different zoom levels in different browsers, and if
possible on different monitors with different native dpi scaling. Report
back the results!


### Mac
I have tested on a high-DPI Mac:
* Chromium (Brave):  Can reproduce problem on `master`, and it's now
fixed
* Firefox:   Can reproduce problem on `master`, and it's now fixed
* Safari:  Can't get it to work; giving up for now
2024-04-01 15:22:47 +02:00
..
ecolor Change `Frame::multiply_with_opacity` to multiply in gamma space (#4283) 2024-03-30 18:39:05 +01:00
eframe Fix blurry rendering in some browsers (#4299) 2024-04-01 15:22:47 +02:00
egui Remove warning in release build 2024-03-31 20:41:44 +02:00
egui-wgpu Release 0.27.1 (#4264) 2024-03-29 13:12:26 +01:00
egui-winit Fix `ViewportCommand::InnerSize` not resizing viewport on Wayland (#4211) 2024-03-30 20:09:28 +01:00
egui_demo_app Rename "Color test" to "Rendering test", and restructure it slightly (#4298) 2024-04-01 13:08:52 +02:00
egui_demo_lib Rename "Color test" to "Rendering test", and restructure it slightly (#4298) 2024-04-01 13:08:52 +02:00
egui_extras Release 0.27.1 (#4264) 2024-03-29 13:12:26 +01:00
egui_glow Remove a bunch of `unwrap()` (#4285) 2024-03-30 19:33:19 +01:00
egui_plot Allow zoom/pan a plot as long as it contains the mouse cursor (#4292) 2024-03-31 20:20:46 +02:00
egui_web Fix typos (#2866) 2023-04-18 15:52:45 +02:00
emath Add some tests for `Rect` 2024-03-26 11:13:04 +01:00
epaint Overload operators for `Rect + Margin`, `Rect - Margin` etc (#4277) 2024-03-30 14:03:41 +01:00