Graphics-Application stage pipeline

Introduction of some graphics concepts, personal excerpts or sorting, as the entry quotes of personal articles;

Application stage pipeline :

The starting point of the rendering pipeline is the CPU, which is the application stage; the application stage can be roughly divided into the following three stages:

Load the data into the video memory :

All the data required for rendering needs to be loaded from the hard disk (HDD) into the system memory (RAM); then, data such as grids and textures are loaded into the storage space on the graphics card-video memory (VRAM); this is Because the graphics card has faster access to the video memory, and most graphics cards do not have direct access to RAM; loaded in the video memory, during rendering, the GPU can quickly access these data; the data loaded in the video memory has vertex position information , Normal direction, vertex color, texture coordinates, etc.;

When the data is loaded into the video memory, the data in the RAM can be removed; but for some data, the CPU still needs to access them (for example, the CPU needs to access the grid data for collision detection), so it may not be moved. In addition to these data, because the process of loading from the hard disk to the RAM is very time-consuming;

 

Set the rendering state :

After the above process, the developer also needs to set the rendering state through the CPU , so as to guide the GPU how to perform the rendering work; by setting the rendering state, define how the grid in the scene is rendered;

 

Invoke Draw Call :

After preparing all the above work, the CPU needs to call a rendering command to notify the GPU to start rendering, that is, the Draw Call command; its initiator is the CPU and the receiver is the GPU; this command will only point to a picture that needs to be rendered A list of primitives, instead of containing any material information-because we have already completed it in the previous stage;

When a Draw Call is given, the GPU will perform calculations based on the rendering state (such as materials, textures, shaders, etc.) and all input vertex data, and finally output as pixels displayed on the screen; this calculation process belongs to the GPU assembly line;


 

Guess you like

Origin blog.csdn.net/DoomGT/article/details/113804617