Extending position only support

This commit is contained in:
Dynamitos
2024-06-19 10:33:19 +02:00
parent e501a69b36
commit 1e91f88355
17 changed files with 75 additions and 112 deletions
+1 -7
View File
@@ -8,7 +8,6 @@ struct PrimitiveAttributes
#ifdef VISIBILITY
uint32_t prim : SV_PrimitiveID;
#endif
bool cull: SV_CullPrimitive;
};
[numthreads(MESH_GROUP_SIZE, 1, 1)]
@@ -38,9 +37,8 @@ void meshMain(
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);
prim[p].cull = !cull.triangleCulled(p);
#ifdef VISIBILITY
prim[p].prim = encodePrimitive(p, meshletId);
prim[p].prim = encodePrimitive(meshletId);
#endif
}
}
@@ -49,11 +47,7 @@ void meshMain(
uint v = min(i, m.vertexCount - 1);
{
uint vertexIndex = pScene.vertexIndices[m.vertexOffset + v];
#ifdef POS_ONLY
VertexAttributes attr = pVertexData.getPosition(m.indicesOffset + vertexIndex);
#else
VertexAttributes attr = pVertexData.getAttributes(m.indicesOffset + vertexIndex);
#endif
vertices[v] = attr.getParameter(inst.transformMatrix);
}
}