I have a situation where I'm drawing several instances of a mesh, but I want to render some of the instances with Clockwise front faces and some with Counter-Clockwise front faces. I'm using DirectX 12 for reference, but this seems like a general problem anyway. As I see it, there are 3 ways to accomplish this:
- Create a separate PSO and switch pipeline states when I want to draw CCW
- Add a geometry shader stage that checks a value in a cbuffer and emits the vertices accordingly
- Create a separate index buffer with CCW ordering and just change that binding for those calls
I'm leaning toward the third option since it seems like the least expensive. Does anyone know of any other ways to accomplish this? Or have any insights into the problem in general?