Hello,

after finding out that my old frustum culling implementation didn't work at all except for the top-down view I was using for that one game I've been using it, I found this article. Now I'm trying to implement the "clip space approach", but the matrix being created there is from OpenGL. Now I know almost nothing about OpenGL, but enough to know that matrix differs in some aspects. The question is: What exactly is the difference, and what do I need to do in order to get a correct layout?

m_frustums[0].Set(m.m31 + m.m41, m.m32 + m.m42, m.m33 + m.m43, m.m34 + m.m44); // near m_frustums[1].Set(-m.m31 + m.m41, -m.m32 + m.m42, -m.m33 + m.m43, -m.m34 + m.m44); // far m_frustums[2].Set(m.m21 + m.m41, m.m22 + m.m42, m.m23 + m.m43, m.m24 + m.m44); // bottom m_frustums[3].Set(-m.m21 + m.m41, -m.m22 + m.m42, -m.m23 + m.m43, -m.m24 + m.m44); // top m_frustums[4].Set(m.m11 + m.m41, m.m12 + m.m42, m.m13 + m.m43, m.m14 + m.m44); // left m_frustums[5].Set(-m.m11 + m.m41, -m.m12 + m.m42, -m.m13 + m.m43, -m.m14 + m.m44); // right

This is my code for setting the 6 planes for the frustum, using the OpenGL values from the article. It seems fine so far, but some of the planes appear to be mirrored on certain axis in certain positions... How do I need to change the values here to have it work for DirectX?