A Slang vertex and fragment shader draw a triangle into an image with dynamic rendering (no render pass object: the pipeline names its colour format), image barriers move it to the attachment and transfer layouts, and vkCmdCopyImageToBuffer reads it back into a PPM. It is the path the Vulkan renderer's passes and screenshots take. The corner comes from SV_VulkanVertexID: Slang compiles SV_VertexID to gl_VertexIndex - gl_BaseVertex, which declares the draw-parameters capability. Validation-clean and VKTRIANGLE OK on the RTX 3070 Ti (Windows) and the M4 Pro (MoltenVK), 13824 pixels covered on both. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| draw_prims.ludic | ||
| gl_triangle.ludic | ||
| reload.ludic | ||
| smooth.ludic | ||
| vk_compute.ludic | ||
| vk_compute.slang | ||
| vk_manifest.ludic | ||
| vk_probe.ludic | ||
| vk_triangle.ludic | ||
| vk_triangle.slang | ||