Commit graph

21 commits

Author SHA1 Message Date
Admin
55a38104aa platform: typed compact vertex formats and u16 indices
Draw shaders can declare geometry POD fields as F16x2/F16x4, U16x2/I16x2
(plain or normalised) and UNorm8x4/SNorm8x4; the fetch converts them to
vec2f/vec4f on Metal and WebGL2 (per-attribute vertexAttribPointer with
type, normalised flag, byte stride and offset), the headless JIT decodes
the same formats, and Vulkan/OpenGL/D3D11 refuse compact layouts with a
logged skip rather than drawing garbage. Attribute packing computes
physical offsets with natural alignment for the whole record; the all-F32
path stays byte-identical (stride = slots * 4, packed_geometry_N on GL).

Geometry::update_typed / update_typed_with_recycled_buffers take
IndexData::{U16,U32} plus a byte vector and the shader's input layout;
updates are validated (stride, whole vertices, index range) and every
geometry carries its index width and a layout signature that survive
releasing the CPU staging, so a draw checks layout and index type against
the resident buffers, never the staging enum. Compact fields are rejected
in instance PODs and in nested aggregates at shader validation; SNORM
minima clamp to -1 like WebGL2.

On Metal the decoded (logical) vertex is reached through the shader
context like the instance is, so every shader function that reads
geometry compiles.

No map stream is converted yet; that is the next cut.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-02 22:02:33 +02:00
Admin
55dde7b02a Land the 3D renderer and leftover sim/math from rik2.
libs/render (Renderer, SceneDraws, preview play) plus the Arcade
sim/math it still draws through. Gameplay crates stay out.
2026-08-18 14:23:59 +02:00
Admin
223cf39256 working emitters 2026-04-01 12:19:02 +02:00
Admin
cf46675a32 xr room mapping 2026-03-27 13:51:54 +01:00
offline-ant
bcd5675051 Fix Mat4f::mul to compute a*b instead of b*a (#966)
Mat4f::mul(a, b) was computing b*a due to transposed summation
indices in the multiplication loop. All call sites (glTF TRS
composition, view-projection, MVP chains, scene hierarchy) are
written expecting standard a*b order, and transform_vec4 uses
standard column-major M*v convention.

Fix: swap the operand bindings so the existing index pattern
produces the correct a*b result.

Add regression test mat4_mul_order that verifies:
- Scale(2)*Translate(5,7) yields tx=10 (scaled translation)
- transform_vec4 on result*(1,1,0,1) yields (12,16)

Co-authored-by: ant <ant@offline.click>
2026-03-17 19:43:02 +01:00
Admin
98bc76b705 vulkan back 2026-03-15 13:20:49 +01:00
Admin
0cfd9f36e0 otw 2026-03-15 09:52:45 +01:00
Admin
695403ef72 xr otw 2026-03-12 15:51:30 +01:00
Admin
59da641980 fix physics stability 2026-03-08 10:44:56 +01:00
Admin
6c5f2728a9 cleanup 2026-03-01 23:15:39 +01:00
Admin
548506cd9c gltf example! 2026-02-16 15:51:24 +01:00
Admin
71bee4562c headless otw 2026-02-15 09:48:28 +01:00
Admin
a271bd0027 compile 2026-02-10 18:26:51 +01:00
Admin
0a1e93a89e align mathtypes to WGSL 2025-12-02 11:43:12 +01:00
Admin
520ef9486f platform2/draw2 otw 2025-11-30 14:56:53 +01:00
Kevin Boos
7bbb42a1b3 Fix modal; enable widgets to block scrolling except within a certain area (#819)
* Fix modal event handling behavior

Everything now works as expected, *except* for Scroll events that seem to
still be received by views beneath the modal, e.g., an underlying PortalList.

* Enable widgets to block scrolling, except within a certain area

* This is important for Modals to prevent scrolling of background widgets
  whilst still allowing the inner `content` view to be scrolled.
* Modals are now forcibly full-screen (or rather, full-window)
  in order to properly ensure that scrolling-allowed areas
  always stay relevant, as the Modal can no longer be contained
  within a non-full-window parent widget/view.

* remove errant log statement
2025-11-13 08:45:36 +01:00
Admin
cf82aea5f8 pod layotus 2025-11-12 11:19:14 +01:00
Admin
a0e4ae49a2 add first step for pods 2025-11-09 21:18:17 +01:00
Admin
cf4f18c829 1.0.0 2025-05-15 16:46:16 +02:00
Admin
a60261c1da 0.9.0 test 2025-05-11 22:24:36 +02:00
Eddy Bruel
ff9048cc37 Initial commit 2025-05-06 10:11:37 +02:00