Fixing projection matrix in examples.

This commit is contained in:
Branimir Karadžić
2017-02-22 22:26:39 -08:00
parent 2e3bdc619e
commit d96225a1f0
20 changed files with 23 additions and 23 deletions

View File

@@ -207,7 +207,7 @@ class ExamplePicking : public entry::AppI
bx::mtxLookAt(view, eye, at);
float proj[16];
bx::mtxProj(proj, 60.0f, float(m_width) / float(m_height), 0.1f, 100.0f);
bx::mtxProj(proj, 60.0f, float(m_width) / float(m_height), 0.1f, 100.0f, bgfx::getCaps()->homogeneousDepth);
// Set up view rect and transform for the shaded pass
bgfx::setViewRect(RENDER_PASS_SHADING, 0, 0, uint16_t(m_width), uint16_t(m_height) );
@@ -238,7 +238,7 @@ class ExamplePicking : public entry::AppI
// Tight FOV is best for picking
float pickProj[16];
bx::mtxProj(pickProj, m_fov, 1, 0.1f, 100.0f);
bx::mtxProj(pickProj, m_fov, 1, 0.1f, 100.0f, bgfx::getCaps()->homogeneousDepth);
// View rect and transforms for picking pass
bgfx::setViewRect(RENDER_PASS_ID, 0, 0, ID_DIM, ID_DIM);