mirror of
https://github.com/bkaradzic/bgfx.git
synced 2026-02-17 20:52:36 +01:00
Fixing projection matrix in examples.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user