I'm rendering mirrored geometry by flipping it's world matrix. Before rendering mirrored geometry I set
CULL_FRONT rasterizer state (for normal geometry it's
CULL_BACK). This works perfectly.
However, I've started implementing instancing and would like to instance mirrored and not mirrored geometry together. What's optimal way to do it?
So far I've considered:
CULL_NONE, but it has huge impact on shading performance
- Geometry shader to flip triangles, but GS is generally slow
Is there any other option? I've found
SV_IsFrontFace, but there's not much documentation about it. I would like to tell GPU in VS: Hey, this triangle should be flipped.