
如果我使用非整数作为字符串的位置,文本将变得模糊。你知道这是什么原因造成的吗?如何纠正它?
this->pSpriteBatch->Begin();
this->pSpriteFont->DrawString(this->pSpriteBatch, szTempMessage, XMFLOAT2(x, y), color);
this->pSpriteBatch->End();我只使用位置和颜色参数调用它。
发布于 2016-07-14 13:09:26
默认情况下,SpriteBatch使用CommonStates::LinearClamp进行渲染,因此如果渲染到子像素位置,它将变得模糊。您可以尝试使用另一种过滤模式,方法是使用Begin覆盖它
// create an instance of CommonStates as pStates
pSpriteBatch->Begin(SpriteSortMode_Deferred,
nullptr /*use default blend state */,
pStates->AnisotropicClamp());
pSpriteFont->DrawString(...);
pSpriteBatch->End();看看这是否会改善你的结果。
https://stackoverflow.com/questions/38351784
复制相似问题