From 62ae550170402a0fa0dbbbb2b739176d5c4bcf1e Mon Sep 17 00:00:00 2001 From: hachem Date: Wed, 19 Aug 2026 20:27:03 +0200 Subject: feat: Vulkan renderer and test pipeline --- assets/shaders/vk_pipeline_test.slang | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 assets/shaders/vk_pipeline_test.slang (limited to 'assets') diff --git a/assets/shaders/vk_pipeline_test.slang b/assets/shaders/vk_pipeline_test.slang new file mode 100644 index 0000000..57027c9 --- /dev/null +++ b/assets/shaders/vk_pipeline_test.slang @@ -0,0 +1,21 @@ +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