this sucks, but there is hope

This commit is contained in:
Dynamitos
2024-04-20 21:35:43 +02:00
parent a27e280ab8
commit acc976fe84
30 changed files with 279 additions and 192 deletions
BIN
View File
Binary file not shown.
+4 -4
View File
@@ -52,7 +52,7 @@ void taskMain(
uint index;
InterlockedAdd(head, 1, index);
p.meshletId[index] = m;
p.instanceId[index] = groupID;
p.instanceId[index] = groupID + pScene.primitiveIndices[m];
}
}
}
@@ -90,9 +90,9 @@ void meshMain(
{
uint p = min(i, m.primitiveCount - 1);
{
uint local_idx0 = unpackPrimitiveIndices(m.primitiveOffset + (p * 3) + 0);
uint local_idx1 = unpackPrimitiveIndices(m.primitiveOffset + (p * 3) + 1);
uint local_idx2 = unpackPrimitiveIndices(m.primitiveOffset + (p * 3) + 2);
uint local_idx0 = pScene.primitiveIndices[m.primitiveOffset + (p * 3) + 0];
uint local_idx1 = pScene.primitiveIndices[m.primitiveOffset + (p * 3) + 1];
uint local_idx2 = pScene.primitiveIndices[m.primitiveOffset + (p * 3) + 2];
indices[p] = uint3(local_idx0, local_idx1, local_idx2);
}
}
-1
View File
@@ -42,6 +42,5 @@ struct Scene
StructuredBuffer<uint32_t> primitiveIndices;
StructuredBuffer<uint32_t> vertexIndices;
};
layout(set=2)
ParameterBlock<Scene> pScene;
+77
View File
@@ -0,0 +1,77 @@
{
"EntryPoint": "taskMain",
"FunctionConstants": [],
"NeedsFunctionConstants": false,
"Resources": [
{
"abIndex": 0,
"slot": 0,
"type": "SRV"
},
{
"abIndex": 1,
"slot": 1,
"type": "SRV"
},
{
"abIndex": 2,
"slot": 2,
"type": "SRV"
},
{
"abIndex": 3,
"slot": 3,
"type": "SRV"
},
{
"abIndex": 4,
"slot": 0,
"type": "CBV"
}
],
"ShaderID": "2266638404583382645",
"ShaderType": "Amplification",
"TopLevelArgumentBuffer": [
{
"EltOffset": 0,
"Size": 24,
"Slot": 0,
"Space": 2,
"Type": "SRV"
},
{
"EltOffset": 24,
"Size": 24,
"Slot": 1,
"Space": 2,
"Type": "SRV"
},
{
"EltOffset": 48,
"Size": 24,
"Slot": 2,
"Space": 2,
"Type": "SRV"
},
{
"EltOffset": 72,
"Size": 24,
"Slot": 3,
"Space": 2,
"Type": "SRV"
},
{
"EltOffset": 96,
"Size": 24,
"Slot": 0,
"Space": 1,
"Type": "CBV"
}
],
"max_payload_size_in_bytes": 4096,
"num_threads": [
128,
1,
1
]
}
Binary file not shown.