Closed Robadob closed 2 years ago
Jack A has suggested this is to do with dead agents still being rendered, will investigate further soon.
I think these two lines should actually be
if (!as.second.core_texture_buffers.empty() && as.second.dataSize && as.second.requiredSize) // Extra check to make sure buffer has been allocated successfully
as.second.entity->renderInstances(std::min(as.second.dataSize, as.second.requiredSize));
The code was accounting for if the buffer hadn't been allocated yet (or resized for an increased agent pop), but wasn't accounting for if the buffer was larger than the current required size (or if there were no agents).
0 Schwann agents, but something which looks like a Schwann agent at the (presumed) origin, as though an agent is being rendered with null/empty texture buffers.
Won't investigate this as a priority, but worth leaving an issue to be aware.