Real-rime rendering (1)-rendering pipeline (rendering pipeline)

Source: Internet
Author: User

A rendering pipeline is the most important part of real-time rendering. Its main task is to generate a 2D image in a virtual scenario, including a camera, object, light, texture, and so on.

Shows the basic rendering pipeline:

There are three main stages: application, geometry, and Rasterizer. Each stage may be divided into smaller pipelines, and some small stages will be executed in parallel. Next we will discuss it one by one.

The application stage

Main Tasks: collision detection, acceleration algorithm, transform animation, and external interface input.

It cannot be subdivided into smaller stages.

To achieve better performance, multi-core execution is usually used for acceleration at this stage.

The geometry stage

Main task: perform operations on each polygon and each fixed point.

Stages can be subdivided, such:

The description of each small stage is as follows:

Model & view thansform)

To obtain the display of a 3D Time Coordinate System Scenario, you must first establish a coordinate system for observation, then convert the object description to the observation coordinate system and project it to the observation plane.

Model conversion is equivalent to changing the coordinates of the model in the world. In OpenGL, there are three main functions used to execute model transformation. They are gltranslate * (), glrotate *(), glscale (). These functions transform objects by moving, rotating, stretching, or reflecting objects, essentially equivalent to generating an appropriate moving, rotating, or scaling matrix, call glmultmatrix * () using this matrix as the parameter, that is, multiply the current matrix and the transformation matrix to obtain the current position.

You can modify the position and direction of an observation point by using the transform phase in the viewport. The function used in OpenGL is gllookat ().

Vertex Shading)

In order to generate a real and perceptible scenario, we must not only render the shape and position of an object, but also render its appearance.

The illumination effect of a material is called coloring. Information related to coloring (color, normal vector, etc.) is stored at each fixed point ), after the coloring result is calculated, it is passed to the Rasterizer stage for interpolation calculation.


Projection refers to the projection of a space scene to a 2D plane for display.

There are two common Projection Methods: Parallel projection and Perspective Projection ).

The projection method in mechanical drawing is parallel projection. The projection ratio must be the same as that in the source image.

The camera and the human eye observe the method of perspective projection, the object is near big and small, consistent with the perspective relationship in the sketch.


Only the objects or parts of the object in the viewport space need to be displayed. When some elements only appear in the viewport, You need to crop them.

Screen ing)

Only the elements in the viewport space reach this stage.

The coordinates of the view are converted to the coordinates of the screen.

The screenmapping stage is responsible for matching the coordinates on the viewport to the screen coordinates.

Rasterizer stage (raster stage)

Objective: To render the color of each pixel.

It can be divided:

Triangle stage-> triangle traversal-> pixel shading-> Merging


This is not the only form of rendering assembly line. When movie rendering is usually used, micro polygon pipelines, academic research and predictive rendering usually use light Chase, now some rendering tools also use the ray tracing Renderer, such as blender. The OpenGL rendering pipeline is shown in:

Generally, the hardware rendering pipeline is fixed, such as Nintendo's Wii, but today's programmable GPU brings us another opportunity: to write your own code at each stage of the pipeline, this is also the biggest advantage of modern GPUs.

Interesting video crysis 2-behind the scenes: rendering pipeline- V =-jvwu3htdiw reference

Real-time rendering 3rd

Openglprogramming guide 7th

Fundamentals of computer graphics 2rd

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.