Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在我正在处理的 Direct3D 应用程序中,我需要在 2D 精灵图像上渲染粒子系统(点精灵)。使用 LPD3DXSPRITE 对象和 Draw 方法绘制 2D 精灵。粒子是在 3D 透视图中绘制的,我需要将它们覆盖在 2D 精灵的顶部。我的问题是我为游戏背景渲染的背景精灵覆盖了 3D 透视图中的点精灵。如果我删除背景图像,我可以看到点精灵。
我怎样才能将点精灵放在背景图像的顶部?谢谢。
关闭 z 写入(ZWRITEENABLE 假设您使用的是 D3D9)绘制精灵。然后像平常一样绘制你的粒子系统(这可能涉及也可能不涉及启用 Z 写入),它将绘制在精灵的顶部。