Nate
(Nate)
March 11, 2015, 10:26am
4
From my test on my iPad, it seems that’s not the case or there’re some options hidden?
I’m only start leanring graphic programming, but from my understanding, resource caching is not the same as Draw Call batching, one is for saving memory and the other is for reducing CPU overhead by reducing graphics API calls.
Here’s the quote from DanielW’s post, he explains better than me:
Sadly the term ‘instancing’ is being used in two ways in UE4.
Instancing of components like UStaticMeshComponent: this means the components are all sharing the same resource , which is the UStaticMesh vertex and index data. This saves memory. As far as draw calls go, each element of a UStaticMeshComponent will issue a draw call in each mesh pass it is in (depth only, base pass, shadow depth pass, etc). Even though every element of every instance/component is a draw call, there’s a lot less state setup for UStaticMeshComponent’s of the same mesh and material and they can cost ~3x less than if every UStaticMeshComponent had a different mesh and material.
Instancing as in UInstancedStaticMeshComponent: this is referring to hardware instancing, which is the GPU feature that you issue one draw call and a bunch of per-instance work is done in the vertex shader. It typically reduces rendering thread overhead, but increases GPU vertex cost and has a very limited feature set, because any per-instance features (all the rendering flags on UPrimitiveComponent) have to be done in the vertex shader. By rendering meshes with low poly counts, you can get huge performance savings with this. UE4 does not yet support lightmaps on UInstancedStaticMeshComponent, but they are coming.