Extending position only support
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user