Skip to content

Strata 0.5.0

Choose a tag to compare

@github-actions github-actions released this 24 Oct 06:33
· 65 commits to main since this release
2f997ac

What the Strata-adoption RFCs asked for: depth readback, nearest filtering,
translucency and on-top overlays, a Python binding, machine-readable image
comparison, and executable tools in the release tarball. Every ABI addition
is compatible: STRATA_ABI_VERSION stays 1 and STRATA_ABI_MINOR is 11.

  • ABI 1.11: translucency and on-top overlays, asked for by a faction-map
    viewer proposal (translucent border fences; relation arcs that show through
    hills) and RFC 0031 (a backing panel for text). All are compatible
    additions.
    • STRATA_MESH_TRANSLUCENT (StrataTexturedMesh.flags): alpha blended
      with alpha color[3] times the texel's alpha, drawn in a new
      translucent pass after the sky, back to front by bounding-box centre,
      depth-tested without writing depth, both faces drawn, casting no shadows.
      Lit or unlit (with STRATA_MESH_UNLIT).
    • strata_submit_lines_ex(engine, vertices, count, flags) with
      STRATA_LINES_ON_TOP, and STRATA_POINT_ON_TOP for points: drawn after
      the depth-tested overlays with no depth test.
    • StrataRect (STRATA_STRUCT_RECT, 32 bytes) and strata_submit_rects:
      filled, alpha-blended screen rectangles, drawn before the frame's text.
    • C# and Python declarations, with layout tests. New golden
      o2_translucent_on_top; the scene format gains mesh_translucent <alpha>, rect, and an on_top option for line and point.
  • strata-imgcmp --json prints the comparison as one JSON object (pass,
    sizes, pixel counts, fraction over, max and mean ΔE, threshold, limit, diff
    path, or an error member on an I/O error) with the same exit status, and
    --always-diff writes the --diff image on a pass too. Asked for by
    RFC 0028 (visual diffs for
    usd-asset-gate,
    ask A2). A diff image that cannot be written is now exit 2 instead of being
    ignored. A CTest test, strata-imgcmp-cli, checks the exit codes and both
    flags.
  • A Python binding, bindings/python/strata (pip install from the
    repository's bindings/python): ctypes declarations of the whole C ABI,
    with no compiled code. Every struct is checked against the library's layout
    tables at load time, and a library whose layouts differ is refused. It has
    a small Engine wrapper, lib.raw.strata_* for direct calls, and
    per-function ABI minors, so a call newer than the loaded library raises
    StrataError naming the minor it needs. The library is loaded from a path,
    STRATA_LIBRARY, STRATA_NATIVE_DIR, or a release fetched by
    strata.load_release(version, sha256), which is verified against a pinned
    SHA-256 and deleted on a mismatch. Desktop Linux and Windows only; Pyodide
    is out of scope. tests/python (unittest) checks the layouts, the release
    fetch (offline) and headless drawing, including bn_primitives_legacy
    drawn from Python against its golden. CI runs it on llvmpipe, and the
    layout tests also run against the Windows DLL. Shared by RFCs 0022, 0026,
    0028 and 0031, and by a plugin-tooling RFC (headless previews).
  • ABI 1.9: strata_read_depth_f32 reads the last frame's depth as float32,
    top row first: the planar distance along the view axis in world units, or
    +infinity where nothing was drawn. Headless surfaces only; a window, a host
    context, and a headless request that fell back to a hidden window return
    STRATA_ERROR_UNSUPPORTED. Asked for by RFC 0026 (headless rendering for
    usd-synth-data).
    A depth_pack draw copies the depth attachment's float bits into RGBA8,
    so it is exact on the GL 4.5 and GLES 3.0 devices alike, and
    src/render/depth_readback.cpp linearises it with the frame's projection
    (either depth convention, or orthographic), with unit tests.
    Engine::readDepth; C# P/Invoke. New golden depth_readback_planes and a
    scene directive, expect_depth <x> <y> <distance|inf>, that checks the
    readback after the captured frame (skipped where unsupported).
  • ABI 1.10: STRATA_TEXTURE_NEAREST (0x8), a strata_create_texture_rgba8
    flag for nearest-texel filtering, so a magnified texture keeps hard texel
    edges (cell fields, pixel art). Both devices already supported it
    internally for the overlay font; the flag exposes it. Asked for by RFC 0025
    (a shared replay player, ask S1), whose fields are hard-edged cells. C#
    StrataAbi.TextureNearest. New golden tex_nearest_field (the same
    checker linear and nearest side by side) and a nearest texture option in
    the scene format.
  • The Linux release tarball keeps the executable bit on bin/strata-golden
    and bin/strata-imgcmp. In 0.4.0 they were mode 0644 (artifact uploads drop
    Unix file modes), so they ran only after a chmod +x. A new CI job,
    Package release assets, builds every release asset on every run, not
    only on tags, sets the modes, and fails unless the tarball's tools are
    executable and strata-imgcmp runs straight from it. The Release job
    publishes that job's assets.
  • strata.h comments for StrataPointLight, StrataTerrainTile and
    StrataMesh now cover STRATA_LIGHTING_SPACE (ABI 1.5): point lights shade
    it, and the terrain and meshes are drawn under every lighting mode and take
    point-light shadows in it. The mesh comment no longer says meshes share the
    terrain's vertex format, which gained a uv in ABI 1.7. Comments only; no
    layout or signature changes.