Skip to content

Add CPU/GPU rough Glass, dispersion, films and caustics - #13

Draft
selun3 wants to merge 21 commits into
fix/render-ui-progressive-20261102from
feat/glass-complete-20261105
Draft

selun3 wants to merge 21 commits into
fix/render-ui-progressive-20261102from
feat/glass-complete-20261105

Conversation

@selun3

@selun3 selun3 commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Change

CPU and GPU renders can use frosted Glass, chromatic dispersion, thin-film coatings, and caustics from hard lights.

Changes a default: no

For the Glass-only change, material-model, photon-map and quality-option defaults remain unchanged. Advanced materials and photon maps require explicit authoring. Jobs without active models, selected scattering or photons retain their preceding smooth-Glass normal and sampling route. Existing authored selected-medium scattering gains hard-light connections and the shared geometric optical facet model.

  • Add isotropic GGX reflection/transmission, visible-normal sampling and matched radiance/importance weights.
  • Add Abbe/Cauchy dispersion at three representative RGB wavelengths, retained through nested paths.
  • Add one coherent lossless dielectric film with separate s/p Airy responses, evanescence and critical-angle limits.
  • Connect rough interfaces, virtual rough-sheet sides and selected HG collisions to directional, point and spot sources.
  • Trace bounded photon caustics to rough interfaces, virtual-sheet sides, HG collisions and the first opaque receiver. Uniform receiver selection preserves the expected visit sum and launched-path normalization.
  • Partition camera estimates at the first sampled continuous event, preserving mixed delta transmission and opaque lighting.
  • Use reciprocal geometric optical facets for advanced transport and retain supported opaque shading-normal density corrections.
  • Resolve GPU optical hard lighting in a separate compute pass with at most 2 MiB of prepaid tile scratch in the existing accumulation binding.
  • Preserve the covered family of the existing closed-shadow approximation and refuse unrepresentable optical arithmetic explicitly.
  • Save material and caustic controls through stable bindings, temporary requests, CPU/GPU jobs and native files. Add native editors and eight-language translations.
  • Extend CPU Path sheets to certified planar tessellations, including concavity and holes. Certify retained GPU geometry after f32 conversion, preserving redundant sphere-pole compatibility.
  • Correct contained-medium Beer/HG light connections and safely prove vacuum for distant outside origins.

The material-model guide documents equations, units, admission, ownership and limits. The Glass matrix records supported geometry and feature combinations. One pending format descriptor covers the new saved fields. The Glass-only diff preserves the pinned rendering parent's kernel, SDK, dependency and application sources.

Stack and merge order

This fork review tracks upstream PR #12200.

Depends on rendering PR #11087. This fork PR targets fix/render-ui-progressive-20261102 at 1b55174743e93b520b1612b77e31f4ea2c10db27. The upstream Glass PR targets its exact upstream mirror stack/render-11087.

The Glass source commit is 90409c5966c7de4babc99f6a9c14471c062ede59, with frozen tree 49f0ed485b6687105020e1186b58785b9c4cea7a and direct parent 1b55174743e93b520b1612b77e31f4ea2c10db27. Its complete diff against that stack base contains 61 Glass paths. The one UI test conflict preserves the union of the parent's tests and the Glass tests.

Merge tangency-labs#11087 first. After it lands, retarget the upstream Glass PR to main and verify the resulting integration. GitHub's mergeability indicator for this stack compares Glass with the mirror; the rendering parent retains its own integration with upstream main.

Validation of the frozen stack

  • Normal coherent workspace/all-targets Cargo build: passed, 103 executable artifacts; compilation and runtime scopes are separate.

  • CPU renderer suite: 792 passed, 0 failed, 1 ignored.

  • GPU crate suite: 233 passed, 0 failed, 3 ignored, actual hardware required; full unique successful/ignored rows cross-check the exact binary listing.

  • Selected UI tests: 14 passed, zero failed. Canonical coverage is 12 host/regrade IDs from the complete CPU suite plus 9 selected UI IDs; 5 additional UI cases are verified separately. These selected tests use synthetic egui/controller input.

  • Public optical-job probe: 5 cases passed. Finite controls complete before and after fixed/adaptive InvalidScene failures and an explicit tiny-roughness worker refusal; failed jobs publish no frame or raw master.

  • Native application: Fresh presented-window material and caustic controls, numerical lens Save preserving independent method/camera intent, actual CPU/GPU Check and two completed 128×96/4SPP jobs with same-frame PNG/EXR, Save/normal quit/fresh-process reopen preserving both complete setups and original geometry, and real normal setup-marker create/remove cycles in both processes with fresh GPU Check unblocked. Recorded normal-workspace development/test graph includes IO trust-unknown-source; driver-crash/retry behavior remains synthetic unit-test scope.

  • Full workspace CI14 completed across 88 binaries: 12963 passed, 34 failed, 62 ignored; actual exit 1. The full gate remains red. 31 failed IDs are listed known failures; 3 additional IDs are unlisted Boolean-property failures. All 2 declared side jobs passed. Exact failures and the original source-unchanged flag are retained; final source verification matches this committed tree.

The nightly scheduling annotation does not make those additional Boolean failures known.

CI14 retains its original source_unchanged=false result. Its exact generated Boolean witness and diff were archived, then the original witness bytes and mode were restored after terminal CI. Final source verification matches the committed frozen tree; the native receipts retain their separate production/index identity and concurrent witness exception.

The first restoration helper stopped after restoring the witness when its raw index-byte guard failed. Recovery verified every logical path/mode/blob/stage entry against the frozen tree. Raw index bytes are not claimed unchanged; the earlier digest was not recorded and the change origin remains unattributed.

The source-component receipt binds 77 transport files, the 14 WGSL files under crates/gpu, and the five original mathematical modules to the earlier Glass commit by exact bytes. The original 34-test standalone mathematical harness retains that limited source-equality scope. Current host/checkpoint behavior, GPU-setup lifecycle, Cargo graph and native application execution use their separate fresh receipts.

Fresh rendering captures

28 fresh original captures: 14 CPU + 14 GPU, each 192×144, 16 SPP, seed 81, depth 16, denoise off. Original PNG/same-frame FLOAT32 EXR digests and finite/nonnegative raw channels were verified. Both contact sheets were visually inspected.

Stack CPU Glass diagnostics

Stack GPU Glass diagnostics

Stack Glass controls after reopening

Stack caustic controls after reopening

The captures are low-sample diagnostic scenes. Completed jobs, same-frame raw masters and controls are recorded separately from convergence, default-quality and CPU/GPU pixel-identity claims.

Evidence history

The original DD commit and its verification archive preserve source dd46941e, tree 058e1074, and parent d238787e. Their native/workspace results and Wood6da/570 compatibility proof remain pinned to those original snapshots. Integration with newer upstream main and merged Wood belongs to the follow-up after tangency-labs#11087 lands.

Model limits

Dispersion uses three representative RGB bands. The coating is one lossless layer. Dense spectral integration, polarization, absorbing/multilayer films and anisotropic rough Glass remain outside this model. Photon caustics use a finite-radius biased estimate and finite path depth. Hard-light visibility does not solve arbitrary further closed refraction. The guides enumerate geometry, nesting, precision, work and device bounds, supported approximations and explicit refusals.

New stack verification archive · New stack validation · New original/published manifest

@selun3
selun3 force-pushed the fix/render-ui-progressive-20261102 branch from d238787 to 1b55174 Compare November 5, 2026 03:24
@selun3
selun3 force-pushed the feat/glass-complete-20261105 branch from dd46941 to 90409c5 Compare November 5, 2026 10:57
@selun3
selun3 force-pushed the fix/render-ui-progressive-20261102 branch from 1b55174 to 2754b49 Compare November 5, 2026 17:29
martinpalsson and others added 5 commits November 5, 2026 23:13
) (tangency-labs#2373)

* claim: tangency-labs#2364

* Sketch Dimension: an origin axis can be picked as a reference (tangency-labs#2364)

The dimension tool ignored clicks on an origin axis and the engine's
sketch.dimension did not resolve x/y. Axis picks now map to the sketch's
linked axis line, as Symmetry and the other line constraints already do,
in all three entry points (click-then-pick, select-then-D, and the command).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Sketch Dimension: tests for a circle centre and a line against the sketch axes (tangency-labs#3137, tangency-labs#3320)

Folds in the cases from tangency-labs#3298: a circle's centre point dimensioned to the
x / y axis (tangency-labs#3137), and a line's angle and an end's distance to the x axis
(tangency-labs#3320). The axis resolution from tangency-labs#2364 already covers them; a plain circle
or arc with a line still measures to its edge (tangency-labs#1803).

Co-authored-by: Phanoob <phanoob@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Sketch Dimension: the axis test picks the line off its midpoint, which is a point pick (tangency-labs#4872)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Phanoob <phanoob@gmail.com>
Co-authored-by: bherbruck <brennen.herbruck@gmail.com>
…, with no second point (tangency-labs#12299) (tangency-labs#12301)

* Sketch Break and Extend: tests for a cut or stop on a center rectangle's centre

Breaking a center rectangle's diagonal at the centre leaves two points there, and extending a line up to the centre ends it on one diagonal only. These tests fail on main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Sketch Break and Extend: a cut or stop on a held midpoint ends there, as Trim does

Break dropped the broken line's Midpoint and joined the pieces at a new point held only on the cutter, so a center rectangle's centre came loose and a corner drag pulled the two points apart. It now uses Trim's rule (one helper, hold_cut): the pieces meet at the held point, which moves its hold to the cutter's middle when the sketch already implies that, and otherwise stays on the cutter.

Extend stopped on a point it lays on the curve it meets unless that curve ends there. A point held at another line's middle (a center rectangle's centre) is now a stop too, so the extension joins it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: bherbruck <brennen.herbruck@gmail.com>
…2041) (tangency-labs#12131)

* claim: tangency-labs#12041

Co-authored-by: ReDead <ReDead@users.noreply.github.com>

* Plane at Angle: use axis direction only with a pivot (tangency-labs#12041)

Add a direction_only option that projects the axis onto the base and
turns about a pivot (or the base origin), with dialog checkbox and
conditional Pivot pick. Older designs keep turning about the full line.

Co-authored-by: ReDead <ReDead@users.noreply.github.com>

* i18n: add ar, he, vi for Use axis direction only (tangency-labs#12041)

Complete catalogs need every English message; the pending locale file
was missing those three so cargo xtask i18n --check failed.

Co-authored-by: ReDead <ReDead@users.noreply.github.com>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: ReDead <ReDead@users.noreply.github.com>
…12448)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@selun3
selun3 force-pushed the fix/render-ui-progressive-20261102 branch from 2754b49 to 138bae0 Compare November 6, 2026 02:39
selun3 and others added 15 commits November 6, 2026 02:47
…angency-labs#6201) (tangency-labs#11087)

* Render: restore saved shots, progressive images and exports

* Render: register existing live and coat command tests

* Render: isolate lens saves and retain bounded previews

Save only lens parameters on existing CPU/GPU jobs while keeping unrelated
draft settings dirty. Retain pinned checkpoints through preview and status,
and release host-only snapshots outside the status lock.

Use the admitted PNG bound for registered-executor checkpoint slots. Preserve
executor work credits, final publication and regrade ownership. Add regression
coverage and align help, translations and capability documentation.

* Render: preserve live feedback and address review regressions

* Preserve saved cameras when applying Render library edits

Keep the saved camera when lighting or maps are applied to an existing shot. Fit and centre the measured Render host using the painted picture. Carry forward the upstream CPU and GPU preset and ZoomTool contracts.
…12392)

tangency-labs#12171 changed the reorder refusal to "moving Notch to position 0 breaks
Notch (...)", so the history case that expected "moving Notch there breaks
Notch" now fails in the kernel rig on every pull request that runs it.
The case checks a substring, so expect "breaks Notch", which both wordings
contain.
…lity fine or finest (tangency-labs#12270) (tangency-labs#12386)

* claim: tangency-labs#12270

* Test: run --out writes meshes at the --quality asked for (tangency-labs#12270)

* Command line: run --quality standard|fine|finest sets the mesh quality of --out exports (tangency-labs#12270)

file.export already took quality, but run --out passed the path alone, so a
fine STL needed a script. --quality is checked before anything runs and goes
to every --out export; the usage text and the getting-started guide say so.

* Command line: run refuses --quality given twice, and the docs say the mesh chord never goes under 1 µm (tangency-labs#12270)

---------

Co-authored-by: Ahmad Khan <ahmad.khan@shiritai.co>
…clicking it, so it passes with an agent installed (tangency-labs#12354) (tangency-labs#12397)

* claim: tangency-labs#12354

* Tests: agent_chat_home_page scrolls Add agent into view before clicking it (tangency-labs#12354)

With an AI agent installed, its card on Preferences > Assistant pushes Add
agent below the visible page. The scenario clicked the button's handle
point, which then lies on the empty footer, and timed out waiting for the
dialog. A widget step scrolls the button into view first.

---------

Co-authored-by: Ahmad Khan <ahmad.khan@shiritai.co>
)

Loading a design walked every folder's chain of parents with a linear
search per step, so the check grew with the cube of the folder count: a
588 KB design with 10 000 nested folders took over three minutes to
open (also as a recovery autosave or over the control channel). Each
chain is now walked once through an id -> parent map, stopping at a
folder already known to end at the top. Cycles are still refused.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
… parameter (tangency-labs#12472) (tangency-labs#12473)

Single holes on several faces send one solid.hole command per face, each
carrying the same `name = expression` text. The second command was refused
because the name was already taken. A definition typed again exactly as an
existing user parameter was defined (same expression, same unit) now names
that parameter; a different value is still refused.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…0364)

* Design tabs: double-click a tab to rename the design

A double-click on the selected design's tab opens a name field in the tab
with the name selected, so typing replaces it. Enter or a click anywhere
else keeps the new name; Escape keeps the old one. The tab grows with the
name while it is typed (up to the tab's usual 200 pt). The rename goes
through component.rename with component 0, so it is undoable, marks the
design unsaved and is what Save As offers next. A name left as it was or
left blank changes nothing, and names are cut to the 128 characters the
command takes.

On desktop the bar is the window's title bar, and a double-click on a tab
used to maximize the window. Double-clicking the bar's empty space still
does; the tabs now rename. The preference tab_double_click_renames
(Preferences > Interface, "Double-click a design tab to rename it") brings
the old behaviour back.

Changes a default: yes - a double-click on a design tab renames the
design, old behaviour (maximize the window) kept behind preference
tab_double_click_renames.

Strings in assets/locales/pending/design-tab-rename.json (en, ar, de, he,
ja, ko, vi, zh). Docs: the UI tour and the preference list in
control-protocol.md (handle tab:rename).

Tests in documents.rs: Enter renames and undo restores; a click elsewhere
keeps the name and the tab grows while typing; Escape, a blank name and
the same name change nothing; an over-long name is cut to fit; with the
preference off a double-click does not rename.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Fix the tab rename for the current egui and ignore the rename result

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: bherbruck <brennen.herbruck@gmail.com>
…tangency-labs#9671)

* claim: tangency-labs#8923

* Sketch palette: drag it by its header to move it (tangency-labs#8923)

The palette docks at the right edge as before; its status header now drags it like a
command dialog's title, and it keeps its place for the rest of the session. It stays on
screen and never goes so low that Finish scrolls out of view. A wide dialog docked at
the left no longer shrinks to the sliver left of a palette that was moved there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Dialogs: drop the token the palette's room no longer needs (tangency-labs#8923)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Sketch palette: keep the token binding the dialog still uses after the rebase

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: bherbruck <brennen.herbruck@gmail.com>
…ency-labs#11947) (tangency-labs#12109)

* claim: bound STEP escape terminator searches (tangency-labs#11947)

Co-Authored-By: Codex <noreply@openai.com>

* fix: stop rescanning unterminated STEP escape tails

Co-Authored-By: Codex <noreply@openai.com>

---------

Co-authored-by: Codex <noreply@openai.com>
…their exact parameters and reply (tangency-labs#12278) (tangency-labs#12353)

* Agents and scripts: the view navigation and layout commands describe their exact parameters and reply (tangency-labs#12278)

describe_command now gives the exact parameters and reply of view.navigate,
view.layout, view.history_layout, view.graphics_preset and
view.ambient_occlusion, and the warn and strict parameter checks use them.

The handlers still read their parameters from the raw JSON, so the new types
read each key as its handler does and give its message. Keys the handlers
refuse when left out (mode, preset, enabled, camera) are required in the
schema but left to the handlers' messages. The replies are built from typed
values instead of json! literals, with the same JSON as before.

* view.navigate: the contract reads only the keys of the form the handler takes (tangency-labs#12278)

The handler reads a motion's keys when motion is given (each motion its own), else direction, else degrees and action, and never the keys of another form. The contract is now read by hand in the same order, so a key of another form is not checked in warn or strict either, and a call that works with the check off works in both.

---------

Co-authored-by: bherbruck <brennen.herbruck@gmail.com>
…and optics describe their exact parameters and reply (tangency-labs#11741) (tangency-labs#11742)

* claim: tangency-labs#11741

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Render bindings: input and output schemas for the surface and optical bind and unbind commands (tangency-labs#11741)

describe_command now gives the exact parameters and reply of the four
commands that bind a library surface or an optical profile to bodies in
a saved render setup, and unbind them, and the warn and strict
parameter checks use them. The handlers already read their parameters
with strict serde types; those types move to the new
schema/render_bindings.rs, gain descriptions and JsonSchema, and become
the contracts. The doc crate's target and setup types have no
JsonSchema, so their schemas are written by hand. The replies are built
from typed values instead of json! literals, with the same JSON, and
the saved setup is serialized before the document changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Render bindings schema: `set` names the setup's fields, and `origin`'s default is the body's centre

`patched_settings` reads a `set` patch onto the saved setup as a
RenderSetup, which refuses unknown fields, so the schema now names the
setup's 14 fields with additionalProperties false (still at most 13 at
once). Without `surface.origin`, render.library.surface.prepare starts
the maps at the centre of the body's bounding box, not at the origin;
the description now says so. A new test covers the field names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Render bindings: keep main's CPU and GPU wording and the OpticalMaterial import after the rebase

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: bherbruck <brennen.herbruck@gmail.com>
* claim: tangency-labs#3426

* test(ui): cover angled-face extrusion preview direction

* Unwrap the world state in the side-face preview test

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Odunayo Balogun <odunayobalogun@users.noreply.github.com>
Co-authored-by: bherbruck <brennen.herbruck@gmail.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
…o groups, both off by default (tangency-labs#8884, tangency-labs#8885) (tangency-labs#8886)

Rebased onto main as one change: the joints group into one button in the timeline, and the History bar folds into component runs, feature folders and STEP inserts. Both views are Preferences > Layout settings and off by default.

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
@selun3
selun3 force-pushed the feat/glass-complete-20261105 branch from 90409c5 to b985319 Compare November 6, 2026 06:46
Add saved optical models, reciprocal rough interface transport, hard-light
connections, and bounded photon caustics for surfaces and selected media.
Keep inactive Glass sampling behavior and document admission and model limits.

Expose native controls and provide original CPU/GPU diagnostic captures.
@selun3
selun3 force-pushed the feat/glass-complete-20261105 branch from b985319 to 4298caf Compare November 6, 2026 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.