• Create Account

#ActualN1ghtDr34m3r

Posted 07 September 2012 - 07:29 AM

Thank you very much. That is just what I needed to know!

How do I calculate the vertically fov ? My Code is now:
float width = tan((D3DX_PI/4)/2)*(float)(1280/720)*(1.0f);
float height = tan((D3DX_PI/4)/2)*(1.0f);
// Set up vertex buffer
{D3DXVECTOR3(-width, -height, -1.0f), D3DXVECTOR2(0.0f, 1.0f)},
{D3DXVECTOR3(-width,  height, -1.0f), D3DXVECTOR2(0.0f, 0.0f)},
{D3DXVECTOR3( width, -height, -1.0f), D3DXVECTOR2(1.0f, 1.0f)},
{D3DXVECTOR3( width,  height, -1.0f), D3DXVECTOR2(1.0f, 0.0f)},
};

It has the same height as the screen, but the width is too small to cover the whole screen.

#3N1ghtDr34m3r

Posted 07 September 2012 - 07:20 AM

Thank you very much. That is just what I needed to know!

How do I calculate the vertically fov ? My Code is now:
float width = tan((D3DX_PI/4)/2)*(float)(1280/720)*(1.0f);
float height = tan((D3DX_PI/4)/2)*(1.0f);
// Set up vertex buffer
{D3DXVECTOR3(-width, -height, -1.0f), D3DXVECTOR2(0.0f, 1.0f)},
{D3DXVECTOR3(-width,  height, -1.0f), D3DXVECTOR2(0.0f, 0.0f)},
{D3DXVECTOR3( width, -height, -1.0f), D3DXVECTOR2(1.0f, 1.0f)},
{D3DXVECTOR3( width,  height, -1.0f), D3DXVECTOR2(1.0f, 0.0f)},
};

It has the same height as the screen, but the width is too small to cover the whole screen.

#2N1ghtDr34m3r

Posted 07 September 2012 - 06:53 AM

Thank you very much. That is just what I needed to know!

How do I calculate the vertically fov ?
I tried it with PI/4 as fov and then my quad has the same width as my screen, but the height is a little lower as the screen.

#1N1ghtDr34m3r

Posted 07 September 2012 - 06:18 AM

Thank you very much. That is just what I needed to know!

PARTNERS