<aside> ℹ️

FStaticMeshRenderData::Serialize

</aside>

Data Load and Render Pass

Strictly speaking, Data Load is not the execution content of the rendering pass.

However, as the data source for the rendering Pass, it is necessary to discuss this part before discussing the Pass execution process.

There are 2 design styles:

  1. Upload on demand: When rendering a Pass, if it is found that the data for a Mesh is not in the VRAM, the data for that Mesh is uploaded from memory to VRAM, and then the pointer is used for rendering.
  2. Upload on load: When loading a Mesh, the data is directly uploaded to the VRAM. Then, during rendering Pass, only the corresponding address in the previously uploaded VRAM is obtained to render that Mesh.

Unreal Engine has chosen the second style.

How is the Static Mesh data required for rendering loaded? We have already discussed this question in the previous section, but in this part, we will delve into the various details.

Load Static Mesh Render Data from Disk

Let’s take a look at this small arrow

How the unreal engine load the FStaticMeshRenderDatafrom the disk?

You can image the process as this: