From 0c18616ee5c586b0fe2b46c91b03c551f68d750d Mon Sep 17 00:00:00 2001 From: Abdelrahman Date: Tue, 20 Oct 2026 20:01:14 +0100 Subject: [PATCH] Update shader --- src/shaders/shader.slang | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/shaders/shader.slang b/src/shaders/shader.slang index 7675541..6b7cbf8 100644 --- a/src/shaders/shader.slang +++ b/src/shaders/shader.slang @@ -10,6 +10,18 @@ static float3 colors[3] = float3[]( float3(0.0, 0.0, 1.0), ); +[[vk::binding(0, 0)]] +StructuredBuffer a; + +[[vk::binding(1, 0)]] +StructuredBuffer b; + +[[vk::binding(2, 0)]] +RWStructuredBuffer result; + +[[vk::push_constant]] +uniform uint count; + struct VertexOutput { float3 color; float4 sv_position : SV_Position; @@ -28,18 +40,6 @@ float4 fragMain(VertexOutput inVert) : SV_Target { return float4(inVert.color, 1.0); } -[[vk::binding(0, 0)]] -StructuredBuffer a; - -[[vk::binding(1, 0)]] -StructuredBuffer b; - -[[vk::binding(2, 0)]] -RWStructuredBuffer result; - -[[vk::push_constant]] -uniform uint count; - [shader("compute")] [numthreads(64, 1, 1)] void compMain(uint tid : SV_DispatchThreadID) {