| 356 | } |
| 357 | |
| 358 | dmVMath::Matrix4 GetNormalMatrix(HRenderContext render_context, const dmVMath::Matrix4& world_matrix) |
| 359 | { |
| 360 | // normalT = transp(inv(view * world)) |
| 361 | Matrix4 normalT = render_context->m_View * world_matrix; |
| 362 | // The world transform might include non-uniform scaling, which breaks the orthogonality of the combined model-view transform |
| 363 | // It is always affine however |
| 364 | normalT = affineInverse(normalT); |
| 365 | normalT = transpose(normalT); |
| 366 | return normalT; |
| 367 | } |
| 368 | |
| 369 | void SetViewMatrix(HRenderContext render_context, const Matrix4& view) |
| 370 | { |
no test coverage detected