From bdb8b3f0fecad03757fe66df0b92d3b9d6698e97 Mon Sep 17 00:00:00 2001 From: TwinAphex51224 Date: Sat, 10 Mar 2012 15:51:42 +0100 Subject: [PATCH] (360) MVP shader stuff fixed --- 360/media/shaders/stock.cg | 2 +- 360/xdk360_video.cpp | 14 +------------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/360/media/shaders/stock.cg b/360/media/shaders/stock.cg index 8e0d14156e..23f8077e2e 100644 --- a/360/media/shaders/stock.cg +++ b/360/media/shaders/stock.cg @@ -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; } diff --git a/360/xdk360_video.cpp b/360/xdk360_video.cpp index 1328e41e61..78580dce4a 100644 --- a/360/xdk360_video.cpp +++ b/360/xdk360_video.cpp @@ -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; }