mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-19 16:59:50 +00:00
(360) MVP shader stuff fixed
This commit is contained in:
parent
6053b61b5b
commit
bdb8b3f0fe
360
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user