emil28092005
d6bd1807cf
feat: depth buffer + 3D model matrix — rotating cube now looks correct
...
- Depth image (D32_SFLOAT) + image view created in VulkanSwapchain
- VkPipelineDepthStencilStateCreateInfo: depth test + write enabled, CompareOp=Less
- Push constant changed from float angle (4B) to mat4 model (64B)
- 3D rotation: RotateY * RotateX in renderer, applied via push constant
- Vertex shader: gl_Position = vp * model * vec4(pos, 1.0)
- Depth attachment in VkRenderingInfo + depth clear (1.0)
- Depth image layout transition (Undefined → DepthStencilAttachmentOptimal)
- New Vulkan functions: vkCreateImage, vkDestroyImage, vkGetImageMemoryRequirements, vkBindImageMemory
- New structs: VkPipelineDepthStencilStateCreateInfo, VkStencilOpState, VkImageCreateInfo
- New enums: VkCompareOp, VkImageType, VkImageTiling
- 0 validation errors
2026-06-18 02:14:54 +03:00
emil28092005
4f3810010a
feat: push constants + UBO descriptor sets — rotating triangle with VP matrix
...
- Push constants: rotation angle (float) sent to vertex shader via vkCmdPushConstants
- UBO + descriptor sets: VP matrix (mat4) in uniform buffer, bound via VkDescriptorSet
- New Vulkan functions: vkCreateDescriptorSetLayout, vkCreateDescriptorPool,
vkAllocateDescriptorSets, vkUpdateDescriptorSets, vkCmdBindDescriptorSets,
vkCmdPushConstants
- New structs: VkPushConstantRange, VkDescriptorSetLayoutBinding,
VkDescriptorSetLayoutCreateInfo, VkDescriptorPoolCreateInfo,
VkDescriptorPoolSize, VkDescriptorSetAllocateInfo, VkWriteDescriptorSet,
VkDescriptorBufferInfo
- Per-frame UBO buffers (HOST_VISIBLE|HOST_COHERENT, 64 bytes each)
- Perspective projection + look-at camera (static, no ECS yet)
- Cleaned up debug logging in VulkanContext
- Zero validation errors
2026-06-18 01:59:41 +03:00
emil28092005
2e0970e769
feat: rebuild Vulkan renderer from scratch — pure P/Invoke triangle (Vulkan 1.3)
...
- Complete rewrite of Engine.Graphics.Vulkan with pure P/Invoke (no wrapper libs)
- Vulkan 1.3: dynamic rendering (vkCmdBeginRendering/vkCmdEndRendering),
synchronization2 (vkQueueSubmit2, vkCmdPipelineBarrier2)
- Split types into VulkanHandles.cs, VulkanEnums.cs, VulkanStructs.cs
- Staging buffer → device-local vertex buffer pattern
- Correct swapchain semaphore indexing (per-image, not per-frame-in-flight)
- VK_EXT_debug_utils debug messenger with validation layer fallback
- Dynamic viewport/scissor (no pipeline recreation on resize)
- Simplified Program.cs to triangle-only rendering
- Removed old Silk.NET renderer, ImGui, PBR shaders, screenshot code
- Updated VULKAN_IMPLEMENTATION_PLAN.md with full architecture decisions
2026-06-18 01:49:25 +03:00
emil28092005
749fbc8df4
feat: ImGui integration + real screenshot capture via Vulkan
...
ImGui:
- ImGui.NET 1.91.6.1 NuGet package
- VulkanImGui: font texture upload, ImGui pipeline (blending, no depth), vertex/index buffer streaming
- GLSL 450 ImGui shaders (vert: scale/translate push constants, frag: font texture sampler)
- Compiled to SPIR-V via @webgpu/glslang
- Debug overlay: FPS, camera position, entity count, light list
- 1600+ FPS with ImGui active
Screenshot:
- vkCmdCopyImageToBuffer embedded in main command buffer
- Layout transition PresentSrcKHR→TransferSrcOptimal→PresentSrcKHR
- Deferred read: staging buffer read on next frame after fence
- BMP format written directly to FileStream (row by row)
- All 16 camera tour screenshots captured (1280x720x32bpp)
All 66 tests pass.
2026-06-17 23:39:38 +03:00
emil28092005
80238b08f5
feat: pure Vulkan P/Invoke renderer — no wrappers, SDL3 window, SPIR-V shaders
...
- Engine.Graphics: restored interfaces (IRenderContext, IRenderer, RenderBackendFactory),
loaders (ObjLoader, GltfLoader), ProceduralMesh, MeshMath, SceneSerializer
- Engine.Graphics.Vulkan: pure P/Invoke to libvulkan.so.1/vulkan-1.dll
- VulkanNative: library loading, function pointer loading via vkGetInstanceProcAddr
- Vk: static function cache for ~80 Vulkan functions, all delegate types
- VulkanTypes: ~50 structs, ~20 enums matching Vulkan C headers
- VulkanContext: instance, physical device, logical device, surface, memory types
- VulkanSwapchain: swapchain, image views, depth image, render pass, framebuffers
- VulkanPipeline: graphics pipeline, descriptor set layout, shader modules
- VulkanBuffer: vertex/index/uniform buffers, staging, memory allocation
- VulkanRenderer: command buffers, sync (semaphores/fences), render loop, 2 frames in flight
- GLSL 450 shaders: PBR lighting (Fresnel, ACES, gamma), directional+point lights
- Compiled to SPIR-V via @webgpu/glslang WASM
- CortexEngine.App: switched to vulkan backend, removed Raylib/OpenTK/ImGui refs
- Tests: all 66 pass (ObjLoader, MeshMath, ProceduralMesh, SceneSerializer, etc.)
- Camera tour: 16 poses, screenshots captured, clean shutdown
2026-06-17 23:03:24 +03:00