Hi,
A couple of folks reached out to me to figure out why my vb merge script is missing elements, and looking through the frame dump log, it seems that 3DMigoto isn't always dumping all the vertex buffers - at least that is my theory. For example, in Samurai Maiden, a frame dump results in a mesh with vb0 and vb1, but there are a bunch of garbage semantics on vb0, all at +000 so it's re-reading the position offset over and over. The numbers don't match only because they're being read as UNORM instead of FLOAT.
vb0[0]+000 POSITION: -0.227301419, 0.975348532, 0.19180724
vb0[0]+012 NORMAL: -0.895824492, -0.412160307, -0.0837205425
vb0[0]+024 TANGENT: 0.41560325, -0.826716423, -0.346219867, -1
vb0[0]+000 TEXCOORD1: 0.70588237, 0.75686276, 0.407843143, 0.745098054
vb0[0]+000 TEXCOORD2: 0.70588237, 0.75686276, 0.407843143, 0.745098054
vb0[0]+000 TEXCOORD3: 0.70588237, 0.75686276, 0.407843143, 0.745098054
vb0[0]+000 TEXCOORD4: 0.70588237, 0.75686276, 0.407843143, 0.745098054
vb0[0]+000 TEXCOORD5: 0.70588237, 0.75686276, 0.407843143, 0.745098054
vb0[0]+000 TEXCOORD6: 0.70588237, 0.75686276, 0.407843143, 0.745098054
vb0[0]+000 TEXCOORD7: 0.70588237, 0.75686276, 0.407843143, 0.745098054
vb0[0]+000 BLENDWEIGHTS: 0.70588237, 0.75686276, 0.407843143, 0.745098054
vb0[0]+000 BLENDINDICES: 0.70588237, 0.75686276, 0.407843143, 0.745098054
vb1[0]+000 COLOR: 0, 0.200000003, 0, 1
vb1[0]+004 TEXCOORD: 0.724121094, -0.0352172852
Looking at the log, there should be a vb2, if I am interpreting the log correctly:
000009 IASetVertexBuffers(StartSlot:0, NumBuffers:8, ppVertexBuffers:0x000000A12A4CCA50, pStrides:0x000000A12A4CCA28, pOffsets:0x000000A12A4CCA08)
0: resource=0x000002133F27A5B0 hash=9b069090
1: resource=0x000002133F27A2B0 hash=47fb6650
2: resource=0x000002133F27EEF0 hash=899413c0
Strangely the ShaderUsage.txt log states it should have a stride of 32 and the missing elements (5-13) are all R8G8B8A8_UNORM so that adds up to 36 for me, so I might be barking up the wrong tree. Regardless, the blendweights and blendindices information is consistently missing, and I suspect it's somewhere in the 3rd input slot (vb2). The third resource is consistently not dumped (899413c0 for this example).
Another example can be seen here in the first post of this issue on my repo.
Thank you very much!
log.txt
ShaderUsage.txt
000009-ib=7eda3a35-vs=630fd39564579813-ps=b49d7ea1173ff7ad.txt
000009-vb0=9b069090-vs=630fd39564579813-ps=b49d7ea1173ff7ad.txt
000009-vb1=47fb6650-vs=630fd39564579813-ps=b49d7ea1173ff7ad.txt
Hi,
A couple of folks reached out to me to figure out why my vb merge script is missing elements, and looking through the frame dump log, it seems that 3DMigoto isn't always dumping all the vertex buffers - at least that is my theory. For example, in Samurai Maiden, a frame dump results in a mesh with vb0 and vb1, but there are a bunch of garbage semantics on vb0, all at +000 so it's re-reading the position offset over and over. The numbers don't match only because they're being read as UNORM instead of FLOAT.
vb0[0]+000 POSITION: -0.227301419, 0.975348532, 0.19180724vb0[0]+012 NORMAL: -0.895824492, -0.412160307, -0.0837205425vb0[0]+024 TANGENT: 0.41560325, -0.826716423, -0.346219867, -1vb0[0]+000 TEXCOORD1: 0.70588237, 0.75686276, 0.407843143, 0.745098054vb0[0]+000 TEXCOORD2: 0.70588237, 0.75686276, 0.407843143, 0.745098054vb0[0]+000 TEXCOORD3: 0.70588237, 0.75686276, 0.407843143, 0.745098054vb0[0]+000 TEXCOORD4: 0.70588237, 0.75686276, 0.407843143, 0.745098054vb0[0]+000 TEXCOORD5: 0.70588237, 0.75686276, 0.407843143, 0.745098054vb0[0]+000 TEXCOORD6: 0.70588237, 0.75686276, 0.407843143, 0.745098054vb0[0]+000 TEXCOORD7: 0.70588237, 0.75686276, 0.407843143, 0.745098054vb0[0]+000 BLENDWEIGHTS: 0.70588237, 0.75686276, 0.407843143, 0.745098054vb0[0]+000 BLENDINDICES: 0.70588237, 0.75686276, 0.407843143, 0.745098054vb1[0]+000 COLOR: 0, 0.200000003, 0, 1vb1[0]+004 TEXCOORD: 0.724121094, -0.0352172852Looking at the log, there should be a vb2, if I am interpreting the log correctly:
000009 IASetVertexBuffers(StartSlot:0, NumBuffers:8, ppVertexBuffers:0x000000A12A4CCA50, pStrides:0x000000A12A4CCA28, pOffsets:0x000000A12A4CCA08)0: resource=0x000002133F27A5B0 hash=9b0690901: resource=0x000002133F27A2B0 hash=47fb66502: resource=0x000002133F27EEF0 hash=899413c0Strangely the ShaderUsage.txt log states it should have a stride of 32 and the missing elements (5-13) are all R8G8B8A8_UNORM so that adds up to 36 for me, so I might be barking up the wrong tree. Regardless, the blendweights and blendindices information is consistently missing, and I suspect it's somewhere in the 3rd input slot (vb2). The third resource is consistently not dumped (899413c0 for this example).
Another example can be seen here in the first post of this issue on my repo.
Thank you very much!
log.txt
ShaderUsage.txt
000009-ib=7eda3a35-vs=630fd39564579813-ps=b49d7ea1173ff7ad.txt
000009-vb0=9b069090-vs=630fd39564579813-ps=b49d7ea1173ff7ad.txt
000009-vb1=47fb6650-vs=630fd39564579813-ps=b49d7ea1173ff7ad.txt