- Home /
Graphics.DrawMeshInstanced sometimes inside out?
Hi,
We recently changed our in-game trees to render using Instancing with Graphics.DrawMeshInstanced. Since we've made this change, a majority of the time the trees still look correct. As they do in the first picture below. But in certain circumstances, all the trees will invert at once as seen in image two.
We've seen this behavior while using Graphics.DrawMeshInstanced to draw other things in bulk, and in all cases, the position of the camera seemed to have some sort of connection to when the anomaly would occur. It's not consistent enough to determine a repeating pattern, but after encountering the effect, moving the camera between two positions will usually change the models back and forth.
As the last data point. The game has been running in the background as I've been typing up this post and the effect cannot be reproduced now. We only see it on occasion, so, it's a strange bug for sure. I'm glad I got the screenshots that I did.
Hopefully, someone has seen or heard of something like this before?
Thanks for your time.
Michael