DeBrumaire Posted February 3, 2023 Share Posted February 3, 2023 Hello everyone ! I'm currently learning OpenCl. And I found that for a very simple code, OpenCl creates a different result compared to VEX. I'm trying to get the average position of near points and create a vector that aims toward this mean position. In VEX, it works as I expect it to work: But in OpenCl it does this weird approximation: For the projects I'm working on, I need my vectors to be precise... Do you know why it behaves this way ? Thank you all ! Quote Link to comment Share on other sites More sharing options...
DeBrumaire Posted February 3, 2023 Author Share Posted February 3, 2023 I forgot to share the .hip file above ! Here it is ! OpenCl_Weird_Vectors.hipnc Quote Link to comment Share on other sites More sharing options...
Alain2131 Posted February 3, 2023 Share Posted February 3, 2023 Salut Mattéo ! The issue is from current_pos I figured it out by simply exporting each of your float3 attributes into your force attribute, and comparing the result with VEX's. sumPos has the exact same result, whereas current_pos is different. Which, if you take a closer look at the line where you load it, you used vload() instead of vload3() ! Quote Link to comment Share on other sites More sharing options...
DeBrumaire Posted February 3, 2023 Author Share Posted February 3, 2023 Salut Alain ! Merci pour ta réponse ! Yeah I didn't see this innacuracy thanks ! x"D Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.