Mostly a for-fun, cosmetic feature: optional post-processing shaders on the page content for a retro look — scanlines, LCD/dot-matrix grid, phosphor mask, color grading. Off by default, opt-in via settings.
Design
- Hook at the page-texture composite: Servo renders the page into our FBO color texture (
platform/render.rs), egui composites it (ui/mod.rs draws browser_tex_id as an image). Replace that with an egui_glow::CallbackFn (the glow backend wraps egui_glow::Painter, which supports PaintCallback) that draws a fullscreen quad sampling the texture through a fragment shader. UI (toolbar/overlays) stays outside the shader — crisp.
- Config in
[display]: a shader selector (e.g. shader = "off" | "scanlines" | "lcd-grid"); applies live.
- Settings UI: a choice row under Display.
Notes
- Page-only vs whole-screen: shading only the page keeps the UI readable and input aligned.
Mostly a for-fun, cosmetic feature: optional post-processing shaders on the page content for a retro look — scanlines, LCD/dot-matrix grid, phosphor mask, color grading. Off by default, opt-in via settings.
Design
platform/render.rs), egui composites it (ui/mod.rsdrawsbrowser_tex_idas an image). Replace that with anegui_glow::CallbackFn(the glow backend wrapsegui_glow::Painter, which supportsPaintCallback) that draws a fullscreen quad sampling the texture through a fragment shader. UI (toolbar/overlays) stays outside the shader — crisp.[display]: a shader selector (e.g.shader = "off" | "scanlines" | "lcd-grid"); applies live.Notes