Aaron Fenyes
93190e99da
Display: bring in keyboard navigation code
2024-09-15 11:54:39 -07:00
Aaron Fenyes
e2d3af2867
Display: say "assembly" instead of "construction"
...
Update variable names and comments in code from the display prototype.
2024-09-15 11:41:16 -07:00
Aaron Fenyes
7cb01bab82
Ray-caster: drop outdated performance comment
...
The size of the internal fragment arrays is what really matters, as
discussed in the "Display" page on the wiki.
2024-09-15 11:38:32 -07:00
Aaron Fenyes
f47be08d98
Display: get the assembly from the app state
2024-09-15 11:31:22 -07:00
Aaron Fenyes
cd18d594e0
Display: bring in ray-casting code
2024-09-14 11:46:24 -07:00
Aaron Fenyes
49655a8d62
Ray-caster: remove debug code
...
Remove GPU code and uniforms that were used as scaffolding during
initial development, but have now been replaced by CPU analogues.
2024-09-14 10:58:46 -07:00
Aaron Fenyes
959e4cc8b5
App: pass app state into outline as context
2024-09-13 15:15:55 -07:00
Aaron Fenyes
49170671b4
App: add display canvas
2024-09-13 14:53:12 -07:00
Aaron Fenyes
0c2869d3f3
Outline: improve code formatting
2024-09-13 00:43:19 -07:00
Aaron Fenyes
e6d1e0b865
Outline: encapsulate assembly data
2024-09-13 00:40:34 -07:00
Aaron Fenyes
d481181ef8
Outline: sort elements by ID
2024-09-13 00:07:49 -07:00
Aaron Fenyes
20b96a9764
Outline: switch from "Editor" to "App"
2024-09-12 22:39:21 -07:00
Aaron Fenyes
634e97b659
Outline: switch to user-facing ID
2024-09-12 22:36:54 -07:00
Aaron Fenyes
336b940471
Outline: start on editor state and outline view
2024-09-12 15:24:41 -07:00
Aaron Fenyes
d3c9a08d22
Add zoom to keyboard controls
2024-09-10 04:08:49 -07:00
Aaron Fenyes
aceac5e5c4
Add roll to keyboard controls
2024-09-10 03:14:33 -07:00
Aaron Fenyes
20d072d615
Combine key-down and key-up handlers
2024-09-10 02:29:50 -07:00
Aaron Fenyes
c67f37c934
Implement keyboard navigation
2024-09-09 19:41:15 -07:00
Aaron Fenyes
2efc08d6c0
Enable focus for tabs and display
...
You can now switch tabs from the keyboard using the usual radio button
interaction.
2024-09-09 02:15:04 -07:00
Aaron Fenyes
69ab888d5b
Simplify control labeling
2024-09-09 00:32:29 -07:00
Aaron Fenyes
0173b63e19
Add picture plane to circles in triangle
2024-09-08 23:43:26 -07:00
Aaron Fenyes
b289d2d4c3
Distinguish odd layer counts in debug mode
...
The low-curvature construction admits odd layer counts.
2024-09-08 23:31:48 -07:00
Aaron Fenyes
163361184b
Ray-caster: avoid roundoff error in quadratic equation
2024-09-08 23:00:28 -07:00
Aaron Fenyes
ab830b194e
Use circles in triangle as low-curvature construction
...
In the process, add a way to build a sphere by offset and curvature.
2024-09-06 19:01:18 -07:00
Aaron Fenyes
3493a798d1
Add low-curvature construction
...
Also add infrastructure for switching between constructions.
2024-09-04 16:27:28 -07:00
Aaron Fenyes
121934c4c3
Encapsulate construction
2024-09-04 12:58:55 -07:00
Aaron Fenyes
a4236a34df
Ray-caster: dim the interior layers of spheres
...
This seems to weaken the intersection disk illusion.
2024-09-02 15:15:18 -07:00
Aaron Fenyes
f148552964
Ray-caster: only draw the top few fragments
...
This seems to increase graphics pipe use from 50--60% to 55--65%.
2024-08-29 15:01:38 -07:00
Aaron Fenyes
6db9f5be6c
Enlarge the test construction to six spheres
...
In debug mode, assign most of the color scale to even layer counts. Odd
layer counts are topologically prohibited, so we should rarely see bugs
severe enough to produce them.
2024-08-28 17:14:55 -07:00
Aaron Fenyes
3a721a4cc8
Ray-caster: enlarge the construction data uniforms
...
No noticeable effect on GPU performance.
2024-08-28 16:06:33 -07:00
Aaron Fenyes
8fde202911
Ray-caster: drop unused depth-pair array
...
This doesn't affect GPU performance noticeably, so benchmarks before and
after the change should be comparable.
2024-08-28 15:52:19 -07:00
Aaron Fenyes
4afc82034b
Ray-caster: sort fragments while shading
2024-08-28 14:37:29 -07:00
Aaron Fenyes
e80adf831d
Ray-caster: correct hit detection
2024-08-28 01:59:46 -07:00
Aaron Fenyes
3d7ee98dd6
Ray-caster: check layer count
...
In debug mode, show the layer count instead of the shaded image. This
reveals a bug: testing whether the hit depth is NaN doesn't actually
detect sphere misses, because `sphere_cast` returns -1 rather than NaN
to indicate a miss.
2024-08-28 01:55:46 -07:00
Aaron Fenyes
c04e29f586
Reduce the frame interval sample frequency
...
At the higher frequency we were using earlier, the overhead from
updating the readout contributed significantly to the frame interval.
2024-08-28 01:47:38 -07:00
Aaron Fenyes
01c2af6615
Rotate and translate construction
...
In the process, write code to make updates that depend on the time
between frames.
2024-08-27 18:39:58 -07:00
Aaron Fenyes
a40a110788
Ray-caster: only draw when the scene is changed
...
This is how I typically schedule draw calls in JavaScript applications.
The baseline CPU activity for the display prototype is now in line with
other pages (though perhaps a bit higher), and the profiler shows little
time being spent in draw calls, even when I'm continually moving a
slider. The interface feels pretty responsive overall, although the
sliders seem to be lagging a bit.
2024-08-27 13:55:08 -07:00
Aaron Fenyes
f62f44b5a7
Optimization: decouple internal and uniform SPHERE_MAX
2024-08-27 00:00:48 -07:00
Aaron Fenyes
ec48592ef1
Ray-caster: add a frame time monitor
...
It's time to start optimizing. Frame time is easy to measure, and we can
use it to gauge responsiveness.
2024-08-26 23:39:51 -07:00
Aaron Fenyes
5e9c5db231
Ray-caster: switch from draw effect to animation loop
...
This wastes a lot of CPU time, as explained on lines 253--258 of
`main.rs`, but it's better than the previous version, which could block
graphics updates system-wide for seconds on end.
2024-08-26 16:06:37 -07:00
Aaron Fenyes
bf140efaf7
Ray-caster: remove hard-coded test construction
2024-08-26 13:51:01 -07:00
Aaron Fenyes
cbec31f5df
Ray-caster: pass colors in through uniforms
2024-08-26 13:41:34 -07:00
Aaron Fenyes
b9370ceb41
Ray-caster: label controls
2024-08-26 01:47:53 -07:00
Aaron Fenyes
85db7b9be0
Ray-caster: pass the sphere count as a uniform
...
In the process, start exploring array size limits of various kinds.
2024-08-26 00:58:20 -07:00
Aaron Fenyes
c5fe725b1b
Ray-caster: automate getting uniform array locations
2024-08-25 22:22:14 -07:00
Aaron Fenyes
5bf23fa789
Ray-caster: pass spheres in through uniforms
...
Keep the hard-coded spheres for comparison.
2024-08-25 21:40:59 -07:00
Aaron Fenyes
206a2df480
Ray-caster: add a third test sphere
...
This helps confirm that the generalized depth-sorting is working.
2024-08-25 16:41:31 -07:00
Aaron Fenyes
c18cac642b
Ray-caster: generalize depth sorting
...
Switch from a hard-coded sorting network for four fragments to an
insertion sort, which should work for any number of fragments.
2024-08-25 00:47:36 -07:00
Aaron Fenyes
8798683d25
Ray-caster: store sphere data in arrays
...
This is a first step toward general depth sorting.
2024-08-25 00:00:28 -07:00
Aaron Fenyes
b9587872d3
Ray-caster: don't bother clearing the screen
...
The ray-caster triangles cover the whole viewport, so they'll completely
overdraw the previous frame.
2024-08-24 11:31:22 -07:00