DX step by step (2) -- draw pipeline (T & L)

Source: Internet
Author: User

Transforming and lighting sounds like a process. Yes, it is a process that creates a 3D scene and a geometric description of the virtual camera, expressed in 2D on the display.

 

 

General steps for creating a pipeline:

Local Coordinate System (your own coordinate system) --> world coordinate system (scene Coordinate System) --> observation coordinate system (camera coordinate orientation transformation) --> background hiding --> illumination

--> Crop -- projection (n-dimensional transformation to n-1 dimension) --> window transformation --> Grating

 

 

 

Local Coordinate System to world coordinate system transformation: Device: settransform (d3dts_world, & worldmatrix );

World coordinate system to observe Coordinate System Changes: Device: settransform (d3dts_view, & viewmatrix );

Backend hiding: Device: setrenderstate (d3drs_currmode, value );

Illumination: IlluminationAlgorithmThe ray tracing algorithm is real-time and basically not used. It generally uses ambient light, mirror light, diffuse reflection light, and parallel light;

Crop: Remove invisible data;

Projection: the process of transforming n-1 dimensions from N-dimensional data. Here, it refers to the process of 3D transformation to 2D. device: settransform (d3dts_projection, & Pro );

Window conversion: Device: setviewport (& vp );

Raster: Use the coloring algorithm to calculate the color value of each pixel;

 

 

 

 

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: info-contact@alibabacloud.com 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.