Jump to content

Precision errors in object position and dimensions


trsh
 Share

Recommended Posts

You're very lucky that JS uses double precision. Because if you try to put big coordinates in Graphics, it will use single precision, and shader uses single precision and THAT will be real problem with precision. Put as much as you can in javascript side: use ".position" in graphics and meshes, dont try to put big coords inside them.

As for the case you mentioned, there's no precision problem.

Link to comment
Share on other sites

1 hour ago, ivan.popelyshev said:

You're very lucky that JS uses double precision. Because if you try to put big coordinates in Graphics, it will use single precision, and shader uses single precision and THAT will be real problem with precision. Put as much as you can in javascript side: use ".position" in graphics and meshes, dont try to put big coords inside them.

As for the case you mentioned, there's no precision problem.

But I put .4 and I got (.4 - 0.0000000001) something. So i lost 0.000001 something?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...