2.5D 矩阵哇音和视频卡
说到 3D,我是个十足的“N”菜鸟。话虽如此,我一直在努力让 2.5 游戏视图正常工作。我在 NVIDIA 上工作,但在我朋友的 ATI 上工作。他要么什么也看不见,要么如果三角形的 Z 值不为 0,他就看不到它。 我猜这不是显卡的故障,也许有些显卡比其他显卡更宽容。这是我的代码:
basicEffect.World = Matrix.Identity;
basicEffect.Projection = Matrix.CreateOrthographic(-camera.Size.X,- camera.Size.Y,-1000, 1000);
basicEffect.View = Matrix.CreateLookAt(new Vector3(camera.Position.X,camera.Position.Y ,-10)
, new Vector3(camera.Position.X, camera.Position.Y, 10),
Vector3.Up) * Matrix.CreateScale(camera.Zoom);
I am a capital 'N' noob when it comes to 3D. With that said, I have been trying to get my 2.5 game view working. Works for me on a NVIDIA ,but not my friend on a ATI. He either see's nothing or if the Z value of a triangle is not 0 he doesnt see it.
I am guessing its not the video cards fault and maybe some video cards are more forgiving then others. Heres my code:
basicEffect.World = Matrix.Identity;
basicEffect.Projection = Matrix.CreateOrthographic(-camera.Size.X,- camera.Size.Y,-1000, 1000);
basicEffect.View = Matrix.CreateLookAt(new Vector3(camera.Position.X,camera.Position.Y ,-10)
, new Vector3(camera.Position.X, camera.Position.Y, 10),
Vector3.Up) * Matrix.CreateScale(camera.Zoom);
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
XNA 论坛此处对此问题进行了解答。
This is answered here on the XNA forum here.