Update shader

This commit is contained in:
abdelrahman committed 2026-10-20 20:01:14 +01:00
1 parent 6277c1f912
commit 0c18616ee5
1 file changed
+12 -12
+12 -12
View File
@@ -10,6 +10,18 @@ static float3 colors[3] = float3[](
float3(0.0, 0.0, 1.0), float3(0.0, 0.0, 1.0),
); );
[[vk::binding(0, 0)]]
StructuredBuffer<float> a;
[[vk::binding(1, 0)]]
StructuredBuffer<float> b;
[[vk::binding(2, 0)]]
RWStructuredBuffer<float> result;
[[vk::push_constant]]
uniform uint count;
struct VertexOutput { struct VertexOutput {
float3 color; float3 color;
float4 sv_position : SV_Position; float4 sv_position : SV_Position;
@@ -28,18 +40,6 @@ float4 fragMain(VertexOutput inVert) : SV_Target {
return float4(inVert.color, 1.0); return float4(inVert.color, 1.0);
} }
[[vk::binding(0, 0)]]
StructuredBuffer<float> a;
[[vk::binding(1, 0)]]
StructuredBuffer<float> b;
[[vk::binding(2, 0)]]
RWStructuredBuffer<float> result;
[[vk::push_constant]]
uniform uint count;
[shader("compute")] [shader("compute")]
[numthreads(64, 1, 1)] [numthreads(64, 1, 1)]
void compMain(uint tid : SV_DispatchThreadID) { void compMain(uint tid : SV_DispatchThreadID) {