| 39 | using namespace dmVMath; |
| 40 | |
| 41 | static void UpdateRenderContextMatrices(HRenderContext render_context, const Matrix4& view, const Matrix4& projection) |
| 42 | { |
| 43 | static const Matrix4 adjusted_ndc_matrix = []() |
| 44 | { |
| 45 | Matrix4 ndc_matrix = Matrix4::identity(); |
| 46 | ndc_matrix.setElem(2, 2, 0.5f); |
| 47 | ndc_matrix.setElem(3, 2, 0.5f); |
| 48 | return ndc_matrix; |
| 49 | }(); |
| 50 | |
| 51 | render_context->m_View = view; |
| 52 | render_context->m_Projection = projection; |
| 53 | render_context->m_ViewProj = projection * view; |
| 54 | render_context->m_ProjectionAdjustedNDC = adjusted_ndc_matrix * projection; |
| 55 | render_context->m_ViewProjAdjustedNDC = adjusted_ndc_matrix * render_context->m_ViewProj; |
| 56 | } |
| 57 | |
| 58 | const char* RENDER_SOCKET_NAME = "@render"; |
| 59 |
no test coverage detected