/* attempt to deal with prototype, bootstrap, jquery conflicts */ /* for dropdown menus */

Jump to content

Image of the Day

Day 17 -- a bunch more tools join the table :) #blender3d #screenshotsaturday #itssaturdaysomewhere #lowpoly #3D https://t.co/CYJucn0Lfv
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net's newsletters to receive the latest updates and exclusive content.


Sign up now

The precision problem of matrix transformation

4: Adsense

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   

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.





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.