mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Fixed shader tiling being bad with virtual scaling on mohaas/mohaab
This commit is contained in:
parent
d40755eb7c
commit
a86ed01ba3
1 changed files with 9 additions and 2 deletions
|
@ -2393,9 +2393,16 @@ void UIWidget::Display
|
|||
|
||||
m_material->ReregisterMaterial();
|
||||
|
||||
if( m_flags & WA_TOP )
|
||||
if( m_flags & WF_TILESHADER )
|
||||
{
|
||||
uii.Rend_DrawPicTiled( 0, 0, m_frame.size.width, m_frame.size.height, m_material->GetMaterial() );
|
||||
if (m_bVirtual) {
|
||||
float fvWidth = m_frame.size.width / m_vVirtualScale[0] / uii.Rend_GetShaderWidth(m_material->GetMaterial());
|
||||
float fvHeight = m_frame.size.height / m_vVirtualScale[1] / uii.Rend_GetShaderHeight(m_material->GetMaterial());
|
||||
|
||||
uii.Rend_DrawPicStretched(0, 0, m_frame.size.width, m_frame.size.height, 0, 0, fvWidth, fvHeight, m_material->GetMaterial());
|
||||
} else {
|
||||
uii.Rend_DrawPicTiled(0, 0, m_frame.size.width, m_frame.size.height, m_material->GetMaterial());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue