The task of rendering pipelines is to start (or render) a two-dimensional image from a three-dimensional scene. In other words, the computer needs to start with a series of fixed-point data, textures, etc., and finally convert the information into an image that can be recognized by the human eye. This work is usually done by the CPU and GPU.
The rendering process is divided into 3 phases:
• Application stage (Application)
• Geometry Stage
• Rasterizer Stage.
Note that this is just a conceptual phase, each phase itself is usually also a pipeline system, that is, the sub-pipeline phase is included. The figure below shows the connection between the three concept phases.
Application stage
From this name we can see that this stage is dominated by our application, so it is usually implemented by the CPU. In other words, we developers have absolute control over this stage.
In this phase, the developer has three main tasks:
First, we need to prepare the scene data, such as the position of the camera, the view cone, which models are included in the scene, which light sources are used, etc.
Secondly, in order to improve the rendering performance, we often need to do a coarse-grained culling work to remove those invisible objects, so that we do not need to hand over to the geometry stage processing;
Finally, we need to set the rendering state of each model.
These rendering states include, but are not limited to, the materials it uses (diffuse color, highlight reflection color), the texture used, the Shader used, and so on. The most important thing at this stage is to output the geometric information needed for rendering, that is, rendering primitives. In general, the rendering primitives can be points, lines, triangles, and so on. These rendering primitives will be passed to the next stage, the geometry phase.
Geometric stage
The geometry stage is used to handle all the things related to the geometry we are drawing. For example, decide what elements you need to draw, how to draw them, and where to draw them. This phase is usually done on the GPU.
The geometry stage is responsible for interacting with each rendered primitive for point-by-point, polygon-by-polygon operations. This phase can be further divided into smaller pipeline stages. An important task of the geometry phase is to convert the coordinates of the fixed point into the screen space and then hand it to the rasterizer for processing. After multi-step processing of the input rendering primitives, this stage will output two-dimensional fixed-point coordinates of the screen space, depth values ​​corresponding to each fixed point, coloring, and other related information, and pass to the next stage.
Rasterization stage
This stage will use the data passed in the previous stage to generate pixels on the screen and render the final image. This phase is also running on the GPU. The task of rasterization is primarily to determine which pixels of each rendered primitive should be drawn on the screen. It needs to interpolate the vertex-by-vertex data (such as texture coordinates, vertex colors, etc.) obtained in the previous stage, and then perform pixel-by-pixel processing.
Acetate-Metal Glasses,Acetate Frames,Acetate Material Glasses,Square Acetate Sunglasses
Danyang Hengshi Optical Glasses Co., Ltd. , https://www.hengshi-optical.com