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
This commit is contained in:
@@ -23,7 +23,7 @@ internal sealed class VulkanRenderContext : IRenderContext
|
||||
};
|
||||
|
||||
_swapchain = new VulkanSwapchain(_ctx.Device, _ctx.PhysicalDevice, _ctx.Surface,
|
||||
surfaceFormat, window.Width, window.Height);
|
||||
surfaceFormat, window.Width, window.Height, _ctx);
|
||||
}
|
||||
|
||||
public IRenderer CreateRenderer()
|
||||
|
||||
Reference in New Issue
Block a user