Skip to content

Register game shaders for hot reload - #90

Open
CanReader wants to merge 1 commit into
stagingfrom
Shader-HotReload
Open

CanReader wants to merge 1 commit into
stagingfrom
Shader-HotReload

Conversation

@CanReader

Copy link
Copy Markdown
Owner

What this changes

Registers Game/assets/shaders with the engine's new shader hot reload, so in Debug builds saving a game shader (voxel, water, the GL gbuffer_gl / lighting_pass_gl overrides) updates the running game. The game folder is registered after the engine's, so the game's copy of an overridden shader is the one that reloads.

Merge CanReader/SleakEngine#224 first. This uses the new Debug/ShaderHotReload.hpp, and CI for PRs into staging builds against the engine's staging branch, so CI here fails until the engine PR is merged. Re-run it after that.

Why

Edits to block and water shaders needed a rebuild and restart. Follow-up for owning the block look in deferred mode: #89.

How it was verified

  • Builds on Linux
  • Loaded a world and played it (-world capbase, Vulkan with --validate and OpenGL), editing game shaders live while it ran
  • Placed and broke blocks
  • Saved, quit, reloaded, and the world was intact

Placing, breaking and saving weren't exercised; this change only adds a Debug-only call in Game::Initialize() and a compile definition.

Checklist

  • Shader changes updated all backend variants and the committed .spv (no shader changes)
  • Save format changes bumped WorldMeta::CURRENT_VERSION and handle old worlds (no save changes)
  • Collision changes kept the single-pass MTV resolution intact (no collision changes)
  • New event handlers are unregistered on scene teardown (no new handlers)

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