まず、目的のステンシルの形状 (この場合は円) のメッシュが必要です。XNA は多くのプリミティブをサポートしていないため、円を三角形で近似する必要があります。
次に、そのメッシュをほぼ通常どおりにレンダリングしますが、以下を使用します。
graphics.DepthStencilState.DepthBufferFunction = CompareFunction.Never;
graphics.DepthStencilState.StencilEnable = true;
graphics.DepthStencilState.ReferenceStencil = 1;
graphics.DepthStencilState.StencilPass = StencilOperation.Replace;
これで、穴のあるステンシルができました。
次に、通常の設定でステンシルを介してテクスチャをレンダリングしますが、次のようにします。
graphics.DepthStencilState.StencilEnable = true;
graphics.DepthStencilState.ReferenceStencil = 1;
graphics.DepthStencilState.StencilFunction = CompareFunction.Equal;
詳細については、DepthStencilState クラスのリファレンスを参照してください。
これは、3D に関する私の知識に基づいています。スプライトを使用する場合は、さらに多くの作業が必要になる場合があります。