Understand some vertex processing

xiaoxiao2021-03-06  45

The vertex processing process:

(Note: The picture takes the book Microsoft DirectX9 Programmable Graphics Pipeline.microsoft copyright. Here is only for learning.)

1. World Transform. This is the first step, put the object into the 3D coordinate space to carry out the next conversion and processing. 2. This step must be done before the View Transform, and if you have completed it after View Transform, you may deepen complexity in accordance with my current understanding. The vertex mixed mainly handles the phenomenon of splitting during the animation process (currently understood). It is found that the vertex is executed in the Fixed Pipeline, which can be seen if Vertex Shader ProgramMable Pipeline cannot use the vertex mix. ? 3. View Transofrm. Perform a spatial coordinate conversion. 4. Vertex fog. The vertex atomization. Because atomization is determined by the distance from the point of viewpoint from the vertex, the quantization value is determined. Therefore, it must be done before the Projection Transform, because after this, the vertex has been transformed to the observation plane, no longer there is a distance (Z value). 5. Lighting and Materials. Light and material treatment. The color value is formed here. Maybe fog and light material processing order can be changed to I think. It must also be done before the Projection Transform. This depends on the space location. 6. Projection Transform. Converted the vertex coordinates to the viewport coordinate. It should be already a two-dimensional coordinate. The Z value should be 0. Just don't know how the Z buffer value is written. This shows that if Vertex Blending is performed. Then, the World Transform Matrix and the VEIW Transform matrix must be transferred into the Vertex Shader. If there is no Vertex Blending, you can transfer the two matrices to Vertex Shader. However, general illumination and material are needed. So Projection Transform may be passed separately. (P: Error. Just see example: Two matrices are passed, one is a matrix after the WORLD VIEW merged. One is a matrix after the three matrices of World View Projection. Also perform twice.). The result of Vertex Position is that the original vertex value is directly output by the Matrix after the WORLD VIEW Projection. (Atomization and lighting material) The original value is multiplied by the original value by the WORLD VIEW. Because the atomization and light material only affect color value. So the intermediate value is discarded directly. Suspected, this may be conducive to zooming errors? But this Made a matrix multiplication (generating multiplication of three matrix merge matrices).)

转载请注明原文地址:https://www.9cbs.com/read-54089.html

New Post(0)