0

Is there a way to completely disable the viewport transform in DirectX 11 or at least define a custom ScreenSpace-to-PixelSpace transformation?

P.S.:

I have read that in older DX versions there used to be things like

pDevice->SetRenderState( D3DRS_VIEWPORTENABLE, FALSE );

but I could not find any info on that no MSDN.

Background:

I have a physical camera and I know the view matrix of this camera and a projection matrix which transforms all the way from view space to pixel space. Now I want to simulate the camera image by simply reusing those same matrices in DirectX.

Martin85
  • 308
  • 4
  • 13
  • I don't understand what exactly you want to achieve, but maybe this question has some starting points for you: http://stackoverflow.com/questions/4583380/what-is-the-xbox360s-d3drs-viewportenable-equivalent-on-winxp-d3d9 – Gnietschow Sep 03 '15 at 14:47

1 Answers1

-1

There's no things like:

pDevice->SetRenderState( D3DRS_VIEWPORTENABLE, FALSE );

But, viewport-transform can be represent as a matrix. Let's call it V. Append matrix inverse( V ) to your transform-pipeline. this will 'cancel' viewport-transform. e.g.

(model-to-world) * (world-to-view) * (projection) * inverse(V)
vard
  • 4,057
  • 2
  • 26
  • 46
ono
  • 1