mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 13:07:42 +00:00
SIMD refactor
This commit is contained in:
@@ -66,22 +66,22 @@ void CTextSupportShader::ImageInstance::SetMetrics(const CFontImageDef& imgDef,
|
||||
if (imgDef.x4_texs.size())
|
||||
{
|
||||
const CTexture& tex = *imgDef.x4_texs[0].GetObj();
|
||||
imgSize.assign(tex.GetWidth() * imgDef.x14_cropFactor.x,
|
||||
tex.GetHeight() * imgDef.x14_cropFactor.y);
|
||||
imgSize.assign(tex.GetWidth() * imgDef.x14_cropFactor.x(),
|
||||
tex.GetHeight() * imgDef.x14_cropFactor.y());
|
||||
}
|
||||
zeus::CVector2f cropPad = imgDef.x14_cropFactor * 0.5f;
|
||||
|
||||
m_pos[0].assign(offset.x, 0.f, offset.y);
|
||||
m_uv[0].assign(0.5f - cropPad.x, 0.5f + cropPad.y);
|
||||
m_uv[0].assign(0.5f - cropPad.x(), 0.5f + cropPad.y());
|
||||
|
||||
m_pos[1].assign(offset.x + imgSize.x, 0.f, offset.y);
|
||||
m_uv[1].assign(0.5f + cropPad.x, 0.5f + cropPad.y);
|
||||
m_pos[1].assign(offset.x + imgSize.x(), 0.f, offset.y);
|
||||
m_uv[1].assign(0.5f + cropPad.x(), 0.5f + cropPad.y());
|
||||
|
||||
m_pos[2].assign(offset.x, 0.f, offset.y + imgSize.y);
|
||||
m_uv[2].assign(0.5f - cropPad.x, 0.5f - cropPad.y);
|
||||
m_pos[2].assign(offset.x, 0.f, offset.y + imgSize.y());
|
||||
m_uv[2].assign(0.5f - cropPad.x(), 0.5f - cropPad.y());
|
||||
|
||||
m_pos[3].assign(offset.x + imgSize.x, 0.f, offset.y + imgSize.y);
|
||||
m_uv[3].assign(0.5f + cropPad.x, 0.5f - cropPad.y);
|
||||
m_pos[3].assign(offset.x + imgSize.x(), 0.f, offset.y + imgSize.y());
|
||||
m_uv[3].assign(0.5f + cropPad.x(), 0.5f - cropPad.y());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user