Correct projection for Metal

This commit is contained in:
Jack Andersen 2016-04-02 20:19:33 -10:00
parent 2fbbbdf3a4
commit 51ecf300ad
2 changed files with 3 additions and 1 deletions

View File

@ -171,6 +171,7 @@ zeus::CMatrix4f CGraphics::CalculatePerspectiveMatrix(float fovy, float aspect,
} }
case boo::IGraphicsDataFactory::Platform::D3D11: case boo::IGraphicsDataFactory::Platform::D3D11:
case boo::IGraphicsDataFactory::Platform::D3D12: case boo::IGraphicsDataFactory::Platform::D3D12:
case boo::IGraphicsDataFactory::Platform::Metal:
{ {
zeus::CMatrix4f mat2(2.f * st.x14_near / rml, 0.f, rpl / rml, 0.f, zeus::CMatrix4f mat2(2.f * st.x14_near / rml, 0.f, rpl / rml, 0.f,
0.f, 2.f * st.x14_near / tmb, tpb / tmb, 0.f, 0.f, 2.f * st.x14_near / tmb, tpb / tmb, 0.f,
@ -215,6 +216,7 @@ zeus::CMatrix4f CGraphics::GetPerspectiveProjectionMatrix(bool forRenderer)
} }
case boo::IGraphicsDataFactory::Platform::D3D11: case boo::IGraphicsDataFactory::Platform::D3D11:
case boo::IGraphicsDataFactory::Platform::D3D12: case boo::IGraphicsDataFactory::Platform::D3D12:
case boo::IGraphicsDataFactory::Platform::Metal:
{ {
zeus::CMatrix4f mat2(2.f * g_Proj.x14_near / rml, 0.f, rpl / rml, 0.f, zeus::CMatrix4f mat2(2.f * g_Proj.x14_near / rml, 0.f, rpl / rml, 0.f,
0.f, 2.f * g_Proj.x14_near / tmb, tpb / tmb, 0.f, 0.f, 2.f * g_Proj.x14_near / tmb, tpb / tmb, 0.f,

2
hecl

@ -1 +1 @@
Subproject commit 1c8c83be453ab713275cfdb2c62beae7e007803d Subproject commit 2df66c1095c0673fd9489b5f45fd2d96c16ef848