Skip to content

veiland 0.3.0

Choose a tag to compare

@sylflo sylflo released this 26 Aug 22:42
· 4 commits to master since this release

veiland 0.3.0

Veiland gains a GLSL shader tier: veiland-shader runs a
Shadertoy-convention fragment shader as a lock-screen layer. Seven
shaders ship in the binary, and a path to your own .frag runs that
instead, so a shader you like on Shadertoy usually drops in unchanged.

Upgrading from 0.2.0 is a straight upgrade: nothing was removed and no
configuration changed.

Added

The shader plugin

  • veiland-shader compiles a Shadertoy-convention mainImage shader
    and renders it into its region every frame. You write only that
    function; the version directive, precision qualifiers, uniform
    declarations, and the main() that calls it are prepended for you.
    fragCoord arrives with Shadertoy's bottom-left origin.
  • Seven embedded presets, needing nothing installed: nebula,
    deepfield, starfield, moon, meteor, warp, and plasma.
    Preset names are a stable interface, like a CLI flag.
  • path runs a .frag file of your own, and wins over preset when
    both are set.
  • The full single-pass Shadertoy uniform set is declared, so a shader
    mentioning one compiles even where the value is not meaningful here.
    iTime, iTimeDelta, iFrame, iFrameRate and iResolution are
    live; iChannel0 is a 256x256 tiling noise texture; iMouse is zero,
    since plugins receive no pointer events; iDate fills only its
    seconds-since-local-midnight component.
  • opacity below 1.0 switches the layer to premultiplied transparency,
    so a shader written with alpha in mind composites over what sits under
    it. At the default 1.0 the layer is opaque and the shader's alpha is
    ignored, which is the right default because Shadertoy shaders write
    undefined alpha.
  • render_scale and max_fps are the thermal knobs. max_fps defaults
    to 30 rather than the compositor rate, because a full-screen fragment
    shader runs your maths on every pixel of every frame.
  • loop_seconds wraps iTime at a period you choose, for shaders with
    a natural cycle or for very long locks, where a float iTime loses
    precision as it climbs.
  • veiland-shader --check [FILE] compiles a shader and prints the
    driver's own compile log, so a syntax error surfaces without locking
    the screen. It exits 0 when the shader compiles; with no argument it
    checks whatever your config selects.
  • A bad shader never costs you the scene. An unknown preset, an
    unreadable or oversized file, or a compile error logs the reason with
    the compiler's full output and draws a dark fill, with the plugin
    still running.

Scenes, widgets, and the SDK

  • A Deep Field astronomy example scene
    (docs/examples/deepfield-astronomy.toml): four shader layers, three
    of them transparent, under a markup clock and an ephemeris HUD.
    Entirely procedural, with no image asset.
  • The markup widget gained a {jd} substitution, the Julian Day
    Number that astronomers count in.
  • GbmEgl::new_es3 in veiland-plugin, for plugins whose shaders need
    a GLES 3 context to compile #version 300 es.