Games104 Modern Game Engine Study Notes 04

Rendering pipeline
Insert image description here
graphics card:
SIMD instructions: instruction-level parallel operations. One instruction, 4 operations. Processing coordinate operations and matrix operations
SIMT: One instruction performs the same instruction operation on multiple cores at the same time.
Modern graphics cards put countless small cores.
Insert image description here

Therefore, when doing all drawing algorithms and drawing operations, use the same code as much as possible, and each accesses their own data. The efficiency will be much higher than the operation on the CPU.

Try to only send data from the cpu to the gpu when the calculation is completed. Do not read data from the gpu. Because logic and rendering are asynchronous, data exchange back and forth will cause frame delays.

Modern engines, for a GO, will divide its mesh into sub-mesh according to different material applications.
The vertex data, index, texture, etc. of each submesh will be stored in a large buffer and obtained through different offsets.

Store all meshes in one pool,
textures in one pool, and
shaders in one pool
Insert image description here
. Pay attention to distinguishing between definitions (GO) and instances (prefab/instance). i.e. classes and objects

bounding box
BVH

Guess you like

Origin blog.csdn.net/Mhypnos/article/details/130590695