mirror of
https://github.com/thunderbrewhq/thunderbrew
synced 2025-12-12 11:12:29 +00:00
feat(gx): add conditional shrink of proj matrix in d3d backend
This commit is contained in:
parent
91baaebd5b
commit
3b7978b84d
1 changed files with 10 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue