Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualNightcrawlerEX

Posted 28 January 2013 - 06:39 AM

oops... i posted the wrong answer i think

 


 


#3NightcrawlerEX

Posted 28 January 2013 - 06:39 AM

oops...

 


 


#2NightcrawlerEX

Posted 28 January 2013 - 06:38 AM

try changing


 output.pos = mul(pos, world);
 output.pos = mul(output.pos, view);
 output.pos = mul(output.pos, projection);


to


matrix WorldView = mul(world, view); //concatenate world and view matrix's so they are one

matrix Final = mul(WorldView, Projection); //concatenate worldView with projection so the final matrix has the properties of all 3

output.pos = mul(pos, Final) //Multiply the input position with the final matrix to retreive the output position

 


 


#1NightcrawlerEX

Posted 28 January 2013 - 06:38 AM

try changing


 output.pos = mul(pos, world);
 output.pos = mul(output.pos, view);
 output.pos = mul(output.pos, projection);


to


matrix WorldView = mul(world, view); //concatenate world and view matrix's so they are one

matrix Final = mul(WorldView, Projection); //concatenate worldView with projection so the final matrix has the properties of all 3

output.pos = mul(pos, Final) //Multiply the input position with the final matrix to retreive the output position

 


You need to have the matrix's concatenate with each other to form the final output pos. Right now you multiply the output pos with the world matrix, write over it with the multiplication between the output pos and the view matrix, Then write over it again with the multiplication between the output pos and the projection matrix


 


PARTNERS