【发布时间】:2015-02-28 16:15:50
【问题描述】:
我正在尝试对游戏中的某些激光实现光晕效果,但遇到了一些问题。 首先,我将绽放应用于所有内容,如下所示:
protected override void Draw(GameTime gameTime)
{
batch.Begin(SpriteSortMode.Texture, BlendState.Additive);
bloom.BeginDraw();
stateManager.Draw(gameTime, batch);
batch.End();
base.Draw(gameTime);
}
效果很好,但当然,它看起来很糟糕,所以将它分成两个绘制调用,一个有绽放,一个没有,我尝试了这个:
protected override void Draw(GameTime gameTime)
{
bloom.BeginDraw();
GraphicsDevice.Clear(Color.Black);
batch.Begin(SpriteSortMode.Texture, BlendState.Additive);
stateManager.DrawBloomed(gameTime, batch);
batch.End();
base.Draw(gameTime);
batch.Begin(SpriteSortMode.Deferred, BlendState.Additive);
stateManager.Draw(gameTime, batch);
batch.End();
base.Draw(gameTime);
}
但是,现在一切都变黑了。 谁能指出我为什么会发生这种情况以及我“真正”应该如何解决这个问题?
【问题讨论】: