mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-04-18 11:02:44 +03:00
feat(gx): add conditional shrink of proj matrix in d3d backend
This commit is contained in:
parent
91baaebd5b
commit
3b7978b84d
@ -1713,7 +1713,16 @@ void CGxDeviceD3d::IXformSetProjection(const C44Matrix& matrix) {
|
|||||||
projNative._43 = v9 / (v9 - v10);
|
projNative._43 = v9 / (v9 - v10);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO shrink
|
if (!this->MasterEnable(GxMasterEnable_NormalProjection) && projNative._44 != 1.0f) {
|
||||||
|
DirectX::XMMATRIX shrink = {
|
||||||
|
0.2f, 0.0f, 0.0f, 0.0f,
|
||||||
|
0.0f, 0.2f, 0.0f, 0.0f,
|
||||||
|
0.0f, 0.0f, 0.2f, 0.0f,
|
||||||
|
0.0f, 0.0f, 0.0f, 1.0f
|
||||||
|
};
|
||||||
|
|
||||||
|
projNative *= shrink;
|
||||||
|
}
|
||||||
|
|
||||||
this->m_xforms[GxXform_Projection].m_dirty = 1;
|
this->m_xforms[GxXform_Projection].m_dirty = 1;
|
||||||
memcpy(&this->m_projNative, &projNative, sizeof(this->m_projNative));
|
memcpy(&this->m_projNative, &projNative, sizeof(this->m_projNative));
|
||||||
|
Loading…
Reference in New Issue
Block a user