Draw camera frustum

What’s the best way of drawing a camera frustum preferably in DX11? I’ve got a 3D scene and need to get a better view from a different angle on what’s going on. Are there any contributions that do that?

Thanks.

View Frustrum transformation matrix is the inverse of ViewProjection and can be applied to a unit box for example.

Camera_ViewFrustrum_Visualization.v4p (9.3 KB)

Cheers

i took the freedom to extend this to a more complete template (which i built for myself once).
this one uses:
the DirectX11 standard cube (which has dimensions 2/2/1) and also takes into account the renderer’s aspect ratio.
for convenience, the cameras can be moved independently in the 2 renderers.

Camera_ViewFrustrum_Visualization_complete.v4p (19.8 KB)

4 Likes

Thanks @tekcor and @motzi.

@motzi: Beautiful, exactly what I was looking for. Thanks!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.