Skip to content

Introduce skid_steer as a new way to load assets - #515

Draft
patowen wants to merge 6 commits into
Ralith:masterfrom
patowen:introduce-skid-steer
Draft

Introduce skid_steer as a new way to load assets#515
patowen wants to merge 6 commits into
Ralith:masterfrom
patowen:introduce-skid-steer

Conversation

@patowen

@patowen patowen commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

This is a relatively significant refactor of Hypermine, switching up asset loading to use a new library called "skid_steer".

It introduces the following changes:

  • A custom AssetLoader type is added to drive asset loading, acting as the glue between skid_steer and Hypermine. This completely replaces the old loader module.
  • All uses of the staging buffer and transfer module from the temporary lahar_deprecated module have been replaced with a vendored growable_ring implementation from @Ralith, and a ParallelQueue from the current version of lahar. This allows us to finally remove the lahar_deprecated module, a task that I had hoped to do years ago.
  • PNG loading and GLTF loading, the only two processes that depended on the old Loader, have been migrated to the new AssetLoader.
  • File-processing (reading PNGs and GLBs) and Vulkan-wrangling (making Vulkan calls) have been fully separated, with all data being read into memory in a convenient form before being passed into Vulkan data structures.
  • To support some of the above changes, some data has been moved around, including the addition of a new ShaderData struct to pass around global data used for rendering.

@patowen
patowen force-pushed the introduce-skid-steer branch 2 times, most recently from 7eb271f to 614549c Compare August 21, 2026 03:05
@patowen
patowen force-pushed the introduce-skid-steer branch from 614549c to 656444b Compare August 22, 2026 02:41
.image(handle)
.subresource_range(range)],
);
xf.device.cmd_clear_color_image(

@patowen patowen Aug 22, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When separating out gtlf-reading logic with Vulkan wrangling, I had decided to remove the functionality that uses cmd_clear_color_image to fill the 1x1 image with a specified color, in favor of just specifying the color directly.

However, this requires a conversion from f32 color to SRGB, which you might have opinions on how to do. One option could be to import something like https://crates.io/crates/palette (although you might have a preferred crate for this). Given that we might want to do more in the future, I don't think we want to hardcode the gamma correction formula.

.material()
.pbr_metallic_roughness()
.base_color_factor()
.map(|c| 255) // TODO: Will likely want a crate for color conversion

@patowen patowen Aug 22, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See https://github.com/Ralith/hypermine/pull/515/changes/BASE..0908719a3be8e59af41e30e075cbe97f0001cf17#r3834892686.

I deliberately kept the lint failing due to this line so that I wouldn't forget to address this.

@patowen
patowen requested a review from Ralith August 22, 2026 03:06
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.

1 participant