From 5b361d81dbd2af0d0e99b9eb1adebea76ff05db0 Mon Sep 17 00:00:00 2001 From: hachem Date: Thu, 20 Aug 2026 02:27:02 +0200 Subject: [chore]: MASSIVE refactor + more vulkan bs --- assets/shaders/VkPipelineTest.slang | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 assets/shaders/VkPipelineTest.slang (limited to 'assets/shaders/VkPipelineTest.slang') diff --git a/assets/shaders/VkPipelineTest.slang b/assets/shaders/VkPipelineTest.slang new file mode 100644 index 0000000..f4d1897 --- /dev/null +++ b/assets/shaders/VkPipelineTest.slang @@ -0,0 +1,25 @@ +// Minimal shader used only to verify the Vulkan graphics-pipeline path (SPIR-V +// module -> pipeline -> draw -> read-back). Draws a full-screen gradient +// triangle from the vertex id, so it needs no vertex buffer, UBO, or sampler. + +struct VSOutput +{ + float4 position : SV_Position; + float3 color : COLOR0; +}; + +[shader("vertex")] +VSOutput vertexMain(uint vid : SV_VertexID) +{ + float2 p = float2(float((vid << 1) & 2), float(vid & 2)); + VSOutput output; + output.position = float4(p * 2.0 - 1.0, 0.0, 1.0); + output.color = float3(p, 0.5); + return output; +} + +[shader("fragment")] +float4 fragmentMain(VSOutput input) : SV_Target +{ + return float4(input.color, 1.0); +} -- cgit v1.3