# Where is the Mclip matrix & how do I set it?

According to this article, the Mclip matrix will be used, but I didn't find any function in Directx11 to set this matrix. How do I set it?

The documentation link you've provided is not from Direct3D 11, it's from Direct3D 9.

That aside, in the code snippets and formulae around discussion of this matrix we see the following:

Cx, Cy - dvClipX, dvClipY from D3DVIEWPORT9
Cw, Ch - dvClipWidth, dvClipHeight from D3DVIEWPORT9
Zmin, Zmax - dvMinZ, dvMaxZ from D3DVIEWPORT9

The mention of "from D3DVIEWPORT9" is your answer: it comes from the viewport. In Direct3D 11 that's an ID3D11DeviceContext::RSSetViewports call.

• Thanks for your reply.Do you know if there is a Directx11 version of Transformation Pipeline by MS? – Mark Peter Dec 29 '20 at 2:24
• @MarkPeter - Direct3D 11 does not have a fixed-function transform pipeline, so there's no comparable documentation. You can familiarise yourself with the D3D 11 pipeline stages at docs.microsoft.com/en-us/windows/win32/direct3d11/… – Maximus Minimus Dec 29 '20 at 9:54
• @MarkPeter - the line of questioning you're taking suggests to me that you have a specific problem in mind here. Maybe it would be more useful for you if you asked a separate question about that specific problem; right now it looks as though you're asking about how you're thinking of solving it, which comes across as an XY Problem. – Maximus Minimus Dec 29 '20 at 16:16
• I don't have specific purpose of using that matrix,but came across it and curious about what it does.Stil,thanks for you suggestions. – Mark Peter Dec 31 '20 at 3:42