(360) MVP shader stuff fixed

This commit is contained in:
TwinAphex51224 2012-03-10 15:51:42 +01:00
parent 6053b61b5b
commit bdb8b3f0fe
2 changed files with 2 additions and 14 deletions
360

View File

@ -33,7 +33,7 @@ FP_OUT main_fragment(FP_IN input) : COLOR
VP_OUT main_vertex(VP_IN input)
{
VP_OUT output;
output.oPosition = mul(modelViewProj, input.position);
output.oPosition = mul(modelViewProj, float4(input.position, 0.0, 1.0));
output.otexCoord = input.texCoord;
return output;
}

View File

@ -322,20 +322,8 @@ static void *xdk360_gfx_init(const video_info_t *video, const input_driver_t **i
// World matrix
XMMATRIX matWorld = XMMatrixIdentity();
// View matrix
XMVECTOR vEyePt = XMVectorSet( 0.0f, -4.0f, -4.0f, 0.0f );
XMVECTOR vLookatPt = XMVectorSet( 0.0f, 0.0f, 0.0f, 0.0f );
XMVECTOR vUp = XMVectorSet( 0.0f, 1.0f, 0.0f, 0.0f );
XMMATRIX matView = XMMatrixLookAtLH( vEyePt, vLookatPt, vUp );
// Determine the aspect ratio
FLOAT fAspectRatio = ( FLOAT )vid->d3dpp.BackBufferWidth / ( FLOAT )vid->d3dpp.BackBufferHeight;
// Projection matrix
XMMATRIX matProj = XMMatrixPerspectiveFovLH( XM_PI / 4, fAspectRatio, 1.0f, 200.0f );
// World*view*projection
vid->modelViewProj = matWorld * matView * matProj;
vid->modelViewProj = matWorld;
return vid;
}