mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-04-16 01:55:21 +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);
|
||||
}
|
||||
|
||||
// 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;
|
||||
memcpy(&this->m_projNative, &projNative, sizeof(this->m_projNative));
|
||||
|
Loading…
Reference in New Issue
Block a user