Currently, I am working on a THREE.JS WebGL project where I am faced with a bottleneck. The issue lies in the instancing of multiple objects with the same geometry. Despite my efforts, I can't seem to pinpoint the exact problem causing the slowdown in performance. Perhaps someone could lend me a hand in resolving this mystery. In my application, I utilize a PointCloud with normals to determine the positioning and orientation of each instanced object using quaternions. However, even after researching various methods like instancing and merging, I'm still unable to identify the root cause of the issue at hand.
Here is a snippet of the code for reference:
bitbucket.org/snippets/electricganesha/Mdddz
Even after numerous reviews, I remain puzzled by what might be causing the drastic drop in FPS from 60 to 20 when executing this particular method.