Release v0.4.1
Patinae v0.4.1
Want to ray trace a 2.5-million-atom-class structure in 4K with 8x antialiasing, real shadows, transparent surfaces, and enough ambition to make your GPU sit up straight?
That is the mood of Patinae 0.4.1.
This release is about taking the beautiful but expensive thing and making it feel like it belongs in the normal workflow. The ray command is no longer a side quest where the renderer hands a mountain of geometry back to the CPU before the raytracer can begin. Large molecular scenes now stay where they should: on the GPU.
The headline change is ray tracing. The ray command no longer has to stream full displayed geometry through the CPU before it can render a large scene. Patinae now exposes renderer-owned GPU artifacts to plugins through a validated opaque-handle ABI, and the raytracer consumes those artifacts directly: spheres, sticks, lines, cartoons, ribbons, and surfaces become GPU ray primitives, the BVH is built on the GPU, antialiasing downsample runs on the GPU, and only the final image is read back.
For large structures this is a different class of pipeline. Instead of moving the whole molecular scene out of the renderer and then rebuilding it for ray tracing, Patinae now traces the data where it already lives. Heavy structures should see a radical improvement in ray-tracing startup time and total render time, especially when representation data is already resident on the renderer GPU.
The second major step is the Plugin API. 0.4.1 turns the new 0.4.0 plugin platform into a portable GPU runtime surface with textures, samplers, render pipelines, offscreen render passes, cached pipeline objects, renderer artifact snapshots, and stricter host-side validation. Plugins still own their domain logic; Patinae owns the GPU objects and keeps the ABI safe across process, device, and command boundaries.
Highlights
Ray tracing for large structures is radically faster
The raytracer now runs on renderer artifacts through the plugin GPU ABI instead of the old displayed-geometry hot path.
In practical terms:
- Large scene data stays on the renderer GPU
- Spheres, sticks, lines, cartoons, ribbons, and surfaces are converted into ray primitives without CPU geometry streaming
- Mixed sphere, cylinder, capsule, and triangle buffers feed one GPU BVH path
- Scene colors are resolved through the renderer color LUT
- BVH construction, ray dispatch, and antialiasing downsample run on the GPU
- Readback is limited to the final image
This fixes the large-structure ray-tracing bottleneck tracked in #9 and makes ray much better suited to serious molecular scenes.
Ray-traced sticks now match realtime sticks
Sticks are now ray-traced as capsules rather than open cylinders. That restores the rounded end caps users see in the realtime viewport, so ray-traced stick images no longer lose the visual shape of the source representation.
Plugin API grows a real GPU runtime
The Plugin API now includes a portable, host-validated GPU runtime for advanced plugins:
- Renderer artifact snapshots for consuming native Patinae representation data
- Opaque command-scoped GPU handles
- Texture, texture-view, and sampler creation
- Storage and sampled texture bindings
- Buffer-texture and texture-texture copy commands
- Offscreen render pipeline and render pass descriptors
- Cached shader module, bind-group layout, pipeline layout, compute pipeline, and render pipeline creation
- Host validation for usage flags, formats, copy extents, dynamic offsets, attachment formats, and device-generation lifetime
The raytracer is the first heavy user of this API, but the contract is general: plugins can ask Patinae for safe GPU services without owning raw wgpu objects themselves.
External plugin documentation
docs/make-your-own-plugin.md is now a full external plugin tutorial. It walks through building a plugin outside the workspace, registering commands, using dynamic settings, installing shared libraries, handling panels and polling, working with script and format handlers, and understanding the GPU/runtime requirements used by advanced plugins.
Safer settings and command plumbing
Built-in settings and dynamic plugin settings now flow through one resolved setting facade. Commands, completions, panels, and reference plugins share the same read, parse, display, and default behavior, while the plugin host keeps the lower-level dynamic registry available for runtime synchronization.
New features
- Native GPU artifact ray tracing: the raytracer consumes renderer-owned sphere, stick, line, cartoon, ribbon, and surface artifacts through the Plugin API instead of streaming displayed geometry through the CPU
- Plugin GPU texture ABI: plugins can create textures, views, samplers, storage and sampled texture bindings, and copy between buffers and textures through host-validated runtime calls
- Plugin render pipeline ABI: plugins can create offscreen render pipelines and record render pass batches without direct ownership of swapchain or renderer targets
- Cached plugin GPU pipelines: shader modules, layouts, and compute/render pipelines can be cached across commands with plugin identity, descriptor fingerprints, layout versions, and device generations included in the cache key
- Renderer artifact contracts: Patinae now documents and validates artifact roles, strides, count sources, color LUT usage, and renderer staleness rules for plugin consumers
- External plugin tutorial: a new long-form guide covers the full path from a minimal command plugin to panels, handlers, dynamic settings, and GPU artifact integration
Bug fixes and improvements
- Intel and lower-limit GPU startup: Patinae now clamps requested
wgpulimits to the selected adapter capabilities instead of unconditionally requesting a very large storage-buffer binding range. This should prevent startup failures on GPUs with lower limits, including Intel integrated graphics. - Oversized cartoon buffers: cartoon storage buffers are skipped against the actual device cap before they can trigger allocation or bind-group validation failures.
- Live viewport background color: desktop and web live viewports now clear with opaque alpha so
bg_coloris visible even when transparent export behavior is available for PNG capture. - REPL undo/redo safety: stale Slint
TextInputundo history is intercepted after command submission, so Cmd/Ctrl-Z or Ctrl-Z cannot replay old prompt text into an empty REPL. - Ray-traced stick shape: native stick artifacts now route to capsule primitives, keeping rounded stick end caps in ray-traced output.
- Zero-count primitive validation: empty primitive classes keep valid typed storage buffers so
wgpuvalidation does not fail on placeholder bindings. - GPU runtime internals: plugin host runtime helpers, render artifact handling, GPU validation, and raytracer artifact GPU code have been split into smaller modules.
Downloads
Bundles (recommended)
Self-contained packages with the app, plugins, and runtime pieces. Unzip or mount and run.
| Platform | Architecture | Download |
|---|---|---|
| macOS | Apple Silicon | Patinae.dmg |
| Windows | x86_64 | patinae-bundle-windows-x86_64.zip |
| Windows | ARM64 | patinae-bundle-windows-arm64.zip |
Standalone executables
Bare binaries for advanced users. Plugins can be installed separately.
| Platform | Architecture | Executable | Plugins |
|---|---|---|---|
| macOS | Apple Silicon | patinae-macos-arm64.tar.gz | patinae-plugins-macos-arm64.tar.gz |
| Windows | x86_64 | patinae-windows-x86_64.zip | patinae-plugins-windows-x86_64.zip |
| Windows | ARM64 | patinae-windows-arm64.zip | patinae-plugins-windows-arm64.zip |
| Linux | x86_64 | patinae-linux-x86_64.tar.gz | patinae-plugins-linux-x86_64.tar.gz |
| Linux | ARM64 | patinae-linux-arm64.tar.gz | patinae-plugins-linux-arm64.tar.gz |
Python and web
| Package | Download |
|---|---|
| Python wheels | pip install patinae or see release assets below |
| Web viewer (WASM + JS) | patinae-web.tar.gz |
Release scale
Compared with v0.4.0, this release touches 82 files, with 16,347 insertions and 2,074 deletions. Most of that work is concentrated in the raytracer, the plugin host, the wire SDK, renderer artifacts, and the new plugin documentation.
Full Changelog: v0.4.0...v0.4.1