A macOS window shows the first lit, fogged 3D scene #1

Closed
agra wants to merge 0 commits from task/3866-a-macos-window-shows-the-first-lit-fogge into master
Owner

Tracker: #3866

Tracker: #3866

The first visible build of hulken, the first step of Foundation #3569.

  • sx build main.sx bundles sx-out/macos/Hulken.app (SDL3 window, Metal); a camera circles a test scene of a ruin, crates and a marker on checkered grass, with towers out in the fog.
  • src/render: camera, mesh builder, fragment-stage constants, and the scene renderer — per-fragment sun with hemisphere ambient, exponential distance fog, mipmapped repeat-sampled ground texture.
  • tests/first_scene_golden.sx pins the scene from a fixed orbit point against tests/pixels/first-scene-metal.png; tools/run_tests.sh runs every test.

Verification

  • Built with sx af8455c3: sx build main.sx bundles the app; launched, it shows the scene in a resizable window.
  • bash tools/run_tests.sh: 1 passed. Recolouring the marker box fails the golden (284 pixels past tolerance).

Head: 3e10bffe9d

Tracker: [#3866](https://sak.swipelab.com/tasks/3866) Tracker: [#3866](https://sak.swipelab.com/tasks/3866) The first visible build of hulken, the first step of [Foundation #3569](https://sak.swipelab.com/tasks/3569). - `sx build main.sx` bundles `sx-out/macos/Hulken.app` (SDL3 window, Metal); a camera circles a test scene of a ruin, crates and a marker on checkered grass, with towers out in the fog. - `src/render`: camera, mesh builder, fragment-stage constants, and the scene renderer — per-fragment sun with hemisphere ambient, exponential distance fog, mipmapped repeat-sampled ground texture. - `tests/first_scene_golden.sx` pins the scene from a fixed orbit point against `tests/pixels/first-scene-metal.png`; `tools/run_tests.sh` runs every test. ## Verification - Built with sx af8455c3: `sx build main.sx` bundles the app; launched, it shows the scene in a resizable window. - `bash tools/run_tests.sh`: 1 passed. Recolouring the marker box fails the golden (284 pixels past tolerance). Head: 3e10bffe9da4b42e5a7b5e62f3e06c92c425eb41
build.sx bundles sx-out/macos/Hulken.app with SDL3 and Metal. main.sx opens
the window, and a camera circles the test scene: a ruin, crates and a marker
on checkered grass, with towers out in the fog.

src/render holds the camera, the mesh builder, the fragment-stage constants
and the scene renderer: per-fragment sun and hemisphere ambient light,
exponential distance fog, and mipmapped, repeat-sampled ground texture.

tests/first_scene_golden.sx renders the scene windowless on Metal from a
fixed orbit point and compares it with tests/pixels/first-scene-metal.png;
tools/run_tests.sh runs every test.
Author
Owner

Merged into master with #2 (17c43e1): its commit 3e10bff is in master, reviewed and approved in #2's review run (sak flow run 152, run 1310).

Merged into master with #2 (17c43e1): its commit 3e10bff is in master, reviewed and approved in #2's review run (sak flow run 152, run 1310).
agra closed this pull request 2026-10-28 12:55:02 +02:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sx/hulken!1
No description provided.