Merge pull request #562 from andr3wmac/shadowmap_projection_fix

Fix for projection width in 16-shadowmaps example.
This commit is contained in:
Branimir Karadžić 2015-11-03 19:03:36 -08:00
commit 3f08a49c6d

View file

@ -1960,7 +1960,7 @@ int _main_(int _argc, char** _argv)
const float camNear = 0.1f; const float camNear = 0.1f;
const float camFar = 2000.0f; const float camFar = 2000.0f;
const float projHeight = 1.0f/tanf(bx::toRad(camFovy)*0.5f); const float projHeight = 1.0f/tanf(bx::toRad(camFovy)*0.5f);
const float projWidth = projHeight * 1.0f/camAspect; const float projWidth = projHeight * camAspect;
bx::mtxProj(viewState.m_proj, camFovy, camAspect, camNear, camFar); bx::mtxProj(viewState.m_proj, camFovy, camAspect, camNear, camFar);
cameraGetViewMtx(viewState.m_view); cameraGetViewMtx(viewState.m_view);