trsh

Precision errors in object position and dimensions

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.

Share this post


Link to post
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?

Share this post


Link to post
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...

  • Recently Browsing   0 members

    No registered users viewing this page.