this sucks, but there is hope
This commit is contained in:
Executable
BIN
Binary file not shown.
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +42,5 @@ struct Scene
|
||||
StructuredBuffer<uint32_t> primitiveIndices;
|
||||
StructuredBuffer<uint32_t> vertexIndices;
|
||||
};
|
||||
layout(set=2)
|
||||
ParameterBlock<Scene> pScene;
|
||||
|
||||
|
||||
@@ -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.
Reference in New Issue
Block a user