summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Svjatoslav Agejenko [Sun, 20 Sep 2026 15:28:39 +0000 (18:28 +0300)]
[maven-release-plugin] prepare release aukio-3d-1.0.0
Svjatoslav Agejenko [Sun, 20 Sep 2026 14:12:36 +0000 (17:12 +0300)]
fix(gui): close-path deadlock, slow window close, null-panel click NPE
Two live-session defects fixed (diagnosed from a frozen launcher
process via jstack + telemetry log):
- ViewPanel.stop(): interrupt the render thread BEFORE
transformExecutor.shutdownNow() and clear pendingPaints only after
the join. shutdownNow() cancelled queued paint tasks whose finally
countDown() then never ran, parking the render thread forever on
paintLatch.await() and hanging the EDT in renderThread.join() —
window unclosable, SIGKILL required.
- Slow close (~2.8 s on every demo): device poll threads sleep 2 s
and stop() did a bare join(1000), burning the full timeout on the
EDT. HeadTrackingManager/SpaceMouseManager now interrupt before
join. SpaceNavigatorHid polls (250 ms) before read() — Linux close()
does not wake a read blocked on a silent-at-rest device — and stop()
joins before closing the fd. HeadTracker.stop() closes before join.
- ViewPanel.stop() now stops GlobalIllumination: GI worker threads
used to leak across demos in the launcher JVM (~3 cores stolen from
the next demo). colorOf() instanceof-guards the SolidPolygon cast —
textured triangles in a GI scene caused a ClassCastException storm.
- Clicking a text editor threw NPE (this.viewPanel is null): demos
build scenes with a null ViewPanel for the headless golden harness,
but GuiComponent.mouseClicked dereferenced the field. Focus never
engaged (no red border) and the exception aborted the frame being
painted (black screen until camera move). MouseInteractionController
gains a 4-arg mouseClicked carrying the dispatching view's
KeyboardFocusStack; RenderingContext/ViewPanel forward it;
GuiComponent focuses via the stack (legacy 1-arg null-guarded).
Verified: 48/48 engine tests, demos ALL GOLDENS PASS; repro harness
closes in 64 ms where the old code hung or took 2.8 s; live user
check of editor focus.
Svjatoslav Agejenko [Sun, 20 Sep 2026 10:54:56 +0000 (13:54 +0300)]
Fix overlay shapes ignoring the z-buffer (bugreport
20260920-131610)
Solid geometry never occluded Line or Billboard/GlowingPoint output:
their span writers blended pixels unconditionally ('overlay semantics'),
so wireframe shapes, text sprites and glow points showed through solid
surfaces — e.g. wireframe pyramids visible through the solid sphere in
ShapeGalleryDemo.
Lines: interpolate 1/z per pixel (projectively linear along the 2D
projected segment; thick path projects each span pixel onto the line
parameter, thin paths reuse their walk parameter) and depth-test with
the same idiom as SolidPolygon. Sprites: screen-aligned, so one 1/z
value covers the whole quad. Both depth-TEST only and never depth-
WRITE (like pass-2 translucent geometry): a line/sprite must not
occlude geometry painted after it, and the HiZ pyramid is unaffected.
Verified: bug-pose render (Snapshot.cameraFromPose on the bugreport
pose) shows a clean sphere disc; all 21 unaffected goldens bit-
identical; shape-gallery + stereo goldens re-blessed after visual
review confirmed every changed pixel is a correct occlusion (wireframe
lines/grid/particles blocked by the solid sphere). Engine 48/48.
Svjatoslav Agejenko [Sun, 20 Sep 2026 09:23:16 +0000 (12:23 +0300)]
Add CsgTest (9 tests) — first-ever coverage of the CSG/BSP machinery
Covers: union/subtract/intersect for disjoint+overlapping boxes
(interior-face and containment invariants), determinism (bit-exact
repeat runs), input immutability, and degenerate empty operands.
The test immediately caught a real defect: Csg.intersect with an empty
operand returned the FIRST operand unchanged (classic BSP sequence
degenerates: clips against an empty tree are no-ops and the inverts
cancel). Csg now guards empty operands explicitly in all three ops.
A naive polygon-count assertion in the test itself was also corrected
to the meaningful centroid invariant (BSP splits boundary faces,
making net counts meaningless).
Svjatoslav Agejenko [Sun, 20 Sep 2026 09:13:31 +0000 (12:13 +0300)]
OctreeVolume: fail loudly on cell-pool exhaustion instead of hanging
getNewCellPointer looped forever when the pool was full (wrap-rescan
with no exit). Two guards now: the usedCellsCount fast path (made honest
— the master cell at index 0 is now counted at initWorld) and an
authoritative full-scan-cycle check that throws IllegalStateException
with capacity + remediation in the message. Verified with a tiny-pool
harness: 7 allocations + master fill 8 cells, the 9th throws (was: hang).
Also: class javadoc now states the subsystem's demo-only status and the
traceCell coverage reality; OctreeVolumeTest (2 tests) pins the
exhaustion behavior with a timeout that fails on the old implementation.
Svjatoslav Agejenko [Sun, 20 Sep 2026 09:05:55 +0000 (12:05 +0300)]
Extract CSG engine + device hotplug; resolve blend-formula question
- New Csg utility (pure polygon-list functions: union/subtract/intersect
over BSP clip/invert sequences). AbstractCompositeShape's three CSG
methods are now one-line delegates; clonePolygons moved into Csg.
Composite drops 95 lines and its dependency on BspTree.
- New gui/DeviceHotplug: head-tracker + SpaceMouse hot-plug managers,
extracted from ViewPanel (which now holds a single field and two
delegating getters). ViewPanel loses its HeadTrackingManager/
SpaceMouseManager lifecycle code.
- Blend formulas: PROVEN bit-identical. SolidPolygon's
((255-a)*dest + a*src)>>8 and TexturedTriangle's lerp form
dest + ((a*(src-dest) - dest)>>8) agree for all 16.6M (a,src,dest)
inputs (exhaustive check). Documented at both span writers; no change.
- transformChildrenParallel's aggregator param: NOT dead as the review
claimed — it feeds the serial-fallback paths. Restored with accurate
javadoc (was nearly deleted on the review's say-so; the build caught
it before commit).
Deliberately NOT split: ViewPanel's render-loop core (mailbox, present
gates, pending paints) and AbstractCompositeShape's parallel-transform
planner — both are concurrency-critical and deliberate; extraction
trades cohesion for race-condition risk with zero functional gain.
Svjatoslav Agejenko [Sun, 20 Sep 2026 08:46:18 +0000 (11:46 +0300)]
Package relocation: make package structure real and acyclic
Moved (git mv, move-only, no behavior change):
- gui -> renderer.raster: RenderingContext, SegmentRenderingContext,
HiZPyramid, CullingStatistics, StereoEye, Frustum, Vertex (math)
- gui -> diag: ThreadActivityRecorder, DebugLogBuffer
- gui -> geometry: Camera (decoupled from gui.FrameListener: dead
ViewPanel param dropped, panel registers a lambda adapter)
- geometry -> renderer.raster.shapes.composite.base: Plane, BspTree,
PolygonType (CSG machinery, used only by shapes)
- renderer.octree -> geometry: IntegerPoint (zero-dep coordinate type)
- ShapeCollection's ViewPanel overloads deleted (trivial delegates;
callers pass getCamera()); RenderingContext.bufferedImage made public
(AWT shell blits it); javadoc {@link}s re-qualified.
Resulting layering: math <- geometry <- renderer.raster <- gui, with
diag a standalone leaf. Remaining known renderer->gui edges (next
refactor): DeveloperTools field + mouse-picking API types
(MouseEvent/MouseInteractionController/ViewSpaceTracker/TextPointer)
and demo-only RayTracer->ViewPanel.
Verified: engine 37/37 tests, all 3 consumer repos (demos, aukio,
aukio-environment-fo4) compile, demo goldens bit-identical to the
pre-relocation run.
Svjatoslav Agejenko [Sun, 20 Sep 2026 08:17:58 +0000 (11:17 +0300)]
Hoist per-triangle mipmap metrics out of the per-tile paint path
- paintFlat no longer recomputes the screen-edge perimeter (3 sqrt) per
overlapped tile: callers pass it in. Object path already computed it
in paintTriangle (it was computed twice per paint); mesh handles read
a per-slot value computed once in TriangleMeshBlock.transform (queued
triangles only). Clipped fan sub-triangles compute inline (rare).
- TriangleMeshBlock UV perimeter (origTtd) precomputed once at build
into uvPerimeter[] instead of 3 sqrt over the final uv[] per paint.
Bit-exact: same expressions, same accumulation order, same inputs —
verified by identical golden diff counts against the pre-change run
(23/23 scenes).
Svjatoslav Agejenko [Sun, 20 Sep 2026 02:29:37 +0000 (05:29 +0300)]
Parallel radix sort for large render queues
The radix path now uses the paint executor: key build, the 8 LSD passes
(per-chunk histograms, digit-major/chunk-minor offsets, per-chunk
scatter) and the final permute all run chunked in parallel. Stability is
preserved exactly, so the output is bit-identical to the serial sort for
any chunk count (pinned by a new RadixLongSortTest property test over
sizes 0..250k x chunk counts 1..8) — golden-image determinism intact.
Also deletes the now-unreachable parallelMergeSort/runSortTasks/
mergeRuns (~100 LOC) and routes the no-executor (headless) path through
the serial radix instead of Arrays.parallelSort.
Measured on a 24-core desktop (450k pairs, SortBench/SortSweep harnesses):
sort phase ~7 ms serial -> ~4-5 ms parallel (1.2-1.8x; bandwidth-bound,
frequency-capped test machine). Key-build/permute parallelization comes
on top in the full pipeline.
Svjatoslav Agejenko [Sun, 20 Sep 2026 02:13:15 +0000 (05:13 +0300)]
Comment/doc truth pass: purge painter-era and double-buffer-era staleness
Code comments/javadoc now match the z-buffer, triple-buffered reality:
- RenderAggregator class javadoc (was painter's algorithm), ctor slot docs
- ViewPanel frameContexts/frameParity comments (was double-buffer/parity)
- RenderingContext depth comment (dropped dead -Daukio.zbuffer knob and
'Null in classic painter mode' — depth is always allocated)
- TexturedTriangle/ShapeCollection/package-info: slot ranges 0..2,
javadoc links retargeted off deleted painter span writers
- AGENTS.org: removed dead BSP-painter and Agentic-development doc links,
added Depth buffer doc, LightmappedCompositeShape + TriangleMeshBlock
to the class catalog, render-pipeline overview now describes the
radix-sort + two-pass z-buffer flow
- TODO.org: dropped completed 'Add 3D mouse support' (SpaceMouse exists)
No behavior change.
Svjatoslav Agejenko [Sun, 20 Sep 2026 02:05:12 +0000 (05:05 +0300)]
Delete verified dead code (~340 LOC)
Classes unreferenced across engine, tests and all consumer repos
(demos, aukio, aukio-environment-fo4): geometry.Circle,
gui.ViewUpdateTimerTask, gui.humaninput.Connexion3D,
renderer.octree.raytracer.RayHit,
shapes.composite.solid.SolidPolygonMesh,
shapes.composite.wireframe.WireframeDrawing.
Also: ViewPanel.renderExecutor — a thread pool that was created,
resized and shut down but never submitted to; and the write-only
static renderFrameCount counter.
Svjatoslav Agejenko [Sat, 19 Sep 2026 21:41:33 +0000 (00:41 +0300)]
Rename doc/ to Documentation/ and unify version at 1.0.0-SNAPSHOT
- Documentation/ picks up the whole former doc/ tree (org sources,
diagrams, screenshots); export-docs.sh comments follow
- .gitignore, AGENTS.org and Tools/Update web site updated to the new
layout (export scan, javadoc staging, graphs, upload)
- pom.xml: 1.5-SNAPSHOT -> 1.0.0-SNAPSHOT; correct <scm> to the
current hosting URL
Svjatoslav Agejenko [Sat, 19 Sep 2026 18:50:12 +0000 (21:50 +0300)]
initial commit