Instruction file imported from KingNepty/GenesisEngine (
.github/instructions/rendering-vulkan.instructions.md). Copyright stays with the author.
Genesis Rendering And Vulkan
- Read Docs/README.md and Docs/RENDERING_RULES.md before non-trivial rendering changes.
- If the task touches ray-traced shadows, denoising, or fallback behavior, read Docs/RT_SHADOWS_ARCHITECTURE.md.
- Preserve the renderer invariants:
- swapchain recreation only on resize or
VK_ERROR_OUT_OF_DATE_KHR - command buffers are reset, not destroyed, per frame
- fences are waited before reuse
- descriptor pools and persistent GPU resources are not recreated every frame
- no hidden allocations in hot rendering paths
- swapchain recreation only on resize or
- Preserve layering: renderer code stays ECS-agnostic, and Runtime remains the bridge from ECS state to render submission.
- Check tasks/lessons.md before changing bindless, shadows, material ownership, culling, SSAO, bloom, or descriptor logic.
- Prefer small targeted fixes over renderer-wide refactors. The fragile rendering surface is not a simplify-first area.
- Validate narrowly before widening scope:
- rebuild the affected target
- compare editor or runtime behavior before and after the change when visual output changed
- check touched-file diagnostics
- Update the canonical docs when behavior or ownership changes:
- Docs/RENDERING_RULES.md
- Docs/RT_SHADOWS_ARCHITECTURE.md for shadow pipeline changes
- Docs/FEATURE_LOCATIONS.md when file ownership moves