Jump to content

  • Log In with Google      Sign In   
  • Create Account

The precision problem of matrix transformation


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
No replies to this topic

#1 dragon.R   Members   -  Reputation: 247

Like
0Likes
Like

Posted 11 April 2013 - 09:35 PM

Yesterday I found a problem of my demo, when the object and camera were far away from (0,0,0), such as  an object at (2000,2000,0) and camera at (2010,2000,0) , the accuracy of Z seemed to declined, lots of Z-Fighting problems appears.

 

The transform code of my model is:

 

output.oPosition=mul(output.oPosition,WorldMatrix);

output.oPosition=mul(output.oPosition,ViewProj);

 

When I change to :

 

output.oPosition=mul(output.oPosition,WorldViewProj);

 

It became just ok.

 

Sometimes I need to transform the object to the world space first and do some other transformations, so I'm afraid this problem will apear again,and I don't know why this two pieces of code have such a big difference.


Edited by dragon.R, 11 April 2013 - 09:37 PM.


Sponsor:



Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS