Emil
139b60b8af
fix: flip Y in vertex shader, dynamic viewport/scissor, clean debug
...
- Fix: Y coordinate was inverted (1.0 - 2.0*y → 2.0*y - 1.0)
Vulkan clip space Y is already down-up, no need to flip
- Fix: dynamic viewport/scissor with viewport_count(1) + scissor_count(1)
Required by validation layer even with dynamic state
- Clean: removed debug eprintlns, restored default clear color
- Shaders recompiled to SPIR-V
2026-06-21 00:41:34 +03:00
Emil
6e9e90fb34
feat: Vulkan renderer with instanced rendering (Phase 4)
...
VulkanRenderer using ash 0.38 + winit:
- Instance with KHR_surface + xlib + wayland extensions
- Physical device selection (first GPU with graphics+present)
- Swapchain (FIFO present mode, B8G8R8A8_UNORM)
- Render pass with color attachment
- Graphics pipeline with instanced rendering:
- Vertex buffer: unit quad (4 verts, 6 indices)
- Instance buffer: 8000 CellInstance structs (32 bytes each)
- 2 vertex bindings: per-vertex (quad pos) + per-instance (grid pos,
atlas UV, fg/bg colors)
- Push constants: screen size + cell size
- Glyph atlas: R8_UNORM texture, uploaded via staging buffer
- fontdue rasterizes DejaVu Sans Mono at startup
- Linear filtering sampler
- Descriptor set: combined image sampler for atlas
- 2 frames in flight with semaphores + fences
- Persistent mapped instance buffer (zero-copy per frame)
Shaders (pre-compiled SPIR-V):
- cell.vert: positions quad from instance data, maps to clip space
- cell.frag: samples atlas alpha, blends fg/bg
--mode vulkan: tries Vulkan, falls back to softbuffer window mode
109 tests, 0 failures
2026-06-21 00:34:01 +03:00
Emil
68f6292c4d
feat: Verbatim MVP - terminal renderer, cellular automaton, Verlet physics
...
- World: 250x250 grid with 14 materials (sand, water, lava, stone, wood, etc.)
- Physics: cellular automaton for materials + Verlet solver for entities
- Entity: multi-cell humanoid (7 sub-bodies with distance constraints)
- Render: terminal renderer with ANSI colors and diff-based updates
- Game loop: fixed 60Hz timestep with accumulator pattern
- Input: WASD movement, number keys for material painting
2026-06-20 18:21:26 +03:00