Skip to content

Display shaders #4

Description

@mxmgorin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions