F# 单游戏3D模型与spritebatch

F# 单游戏3D模型与spritebatch,f#,monogame,F#,Monogame,我正在使用MonoGame在同一个游戏中绘制一些精灵和一些模型。我可以绘制并查看所有内容,但渲染状态都是错误的 在绘制模型之前,我尝试设置渲染状态,然后进行绘制,但深度缓冲区完全错误。这是我的(F#)坏代码,我做错了什么 this.GraphicsDevice.Value.RasterizerState <- RasterizerState.CullCounterClockwise this.GraphicsDevice.Value.DepthStencilState <- Dept

我正在使用MonoGame在同一个游戏中绘制一些精灵和一些模型。我可以绘制并查看所有内容,但渲染状态都是错误的

在绘制模型之前,我尝试设置渲染状态,然后进行绘制,但深度缓冲区完全错误。这是我的(F#)坏代码,我做错了什么

this.GraphicsDevice.Value.RasterizerState <- RasterizerState.CullCounterClockwise
this.GraphicsDevice.Value.DepthStencilState <- DepthStencilState.Default
this.GraphicsDevice.Value.BlendState <- BlendState.Opaque

for m in this.AllModels do
  m.Model.Draw(m.World, camera.View, camera.Projection)

this.GraphicsDevice.Value.RasterizerState真为我没早点想到这一点感到羞耻。这是一个预测问题。近平面太近(0.01),视野太窄(Pi/4)。有了0.1和Pi/2,这一切都像一个魔咒。

我想我不能帮你解决这个问题,但屏幕截图可能会让你的问题更清楚。模型进行了补偿,好像深度缓冲区没有正常工作一样。我不认为截图会更有说服力。。。