I made a grass field using InstancedMesh in R3F, taking inspiration from the grass field example in R3F (Grass shader - CodeSandbox). It works perfectly on desktop, but on mobile, the grass just disappears, and I can’t figure out why.
Could you please post the code? I want to observe the differences. My scene objects still occasionally disappear and become invisible. It’s truly amazing.
Hope it helps
If you’re still facing the issue, please let me know. I haven’t been very active here lately, so I might miss messages. In that case, feel free to email me at ashutosh1008c@gmail.com or reach out via LinkedIn: https://www.linkedin.com/in/at010303/
Hello, I’m very glad to see your proposal.
In fact, I discovered more issues related to InstancedMesh. I think this is something worth paying attention to. When loading models or other graphics using InstancedMesh, if the visible setting of InstancedMesh is set to false or the visible setting of the upper Object3D is set to false, the instances will not be displayed after instantiation. This is the problem. To solve this, there is only one solution - either do not add it in a hidden manner, or keep executing renderer.render(…) in the setAnimationLoop, which is very inefficient in terms of performance. In summary, there is a problem when executing renderer.render(…) only once or twice after instantiating InstancedMesh.
It should be emphasized again that in many aspects of THREE.WebGPURenderer, the renderer.compile method is required; otherwise, there will be display issues.
There is another issue related to precision. When setting renderer.highPrecision = true, this problem naturally occurs.