scngeometry

Why does SCNNode .flattenedClone() either crash or make performance worse?

你离开我真会死。 提交于 2019-12-24 07:39:06
问题 I'm attempting to add around 4.5k SCNNode objects to a scene. Their geometries are one of two SCNPlane s, whose materials are rendered by CALayer s (but I don't think that matters, the CALayerDelegate s are only called once each, so that doesn't seem to be an issue.) Performance is terrible (< 1fps.) With .showsStatistics enabled I see I'm doing almost 3.5k draw calls, which is my problem according to this WWDC video from 2017. So, as suggested, I add all my nodes to one parent node and call