I’m starting to have performance issues in a rather small project, and have a couple of questions.
-
Am I correct in assuming that draw calls is related to the number of meshes inside an entity? (One draw call per mesh instance per entity), and so reducing the number of materials per entity will reduce the draw calls? I build up a map out of lots of small tiles, and some of the tiles have multiple materials. There are very few polies, but I think there will be a lot of draw calls, some of which I could probably reduce.
-
What is the performance impact of setting uniforms inside a shader? I’m updating 3 floats every frame inside a post effect, and it seems to be making more of a difference then I would like. These floats aren’t changing the number of samples or anything I would associate with performance. The post effect does speed-streaks dependant on the x, y, and z speed of the player. I haven’t seen anything that would allow me to pass in a Vec3)
-
Would using entity.clone() be faster than creating a new entity and adding components to it? I suspect it would be, but was wondering if you had any metrics on this rather than my “gut feel.” Actually, I haven’t got to this part of the project yet, but will very soon…
Drat, now that I test it again it’s running fine. Maybe having the chrome dev tools open slows things down. Oh well, my questions still stand.