In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces the basic knowledge of graphics, understanding of Unity image rendering mechanism, and image rendering pipeline process.
Mainly because with the rapid development of VR/AR, shader programming (Shader) has become a necessary knowledge for Unity program developers in order to meet the limit rendering of VR HD and high frame rate.
First of all, let's introduce the Unity image rendering mechanism.
In the Unity engine, any image rendering needs a very important file attribute-Material (material ball), which can be seen in MeshRenderer, LineRenderer, UI rendering and trailing rendering. Therefore, we can understand Material as a tool for image rendering in Unity, and Shader (shader) can be understood as the processing factory of the tool Material. Shader (processing factory) defines the solution for Material rendering, defining the raw materials needed for Material rendering, and the raw materials we are talking about at this time, that is, the attributes in Shader (values, colors, textures, maps, etc.).
Render drawing pipeline
Now that I understand the Unity image rendering mechanism, I'll introduce the rendering drawing pipeline. So what is the rendering drawing pipeline? Rendering pipeline, also known as rendering pipeline, is a parallel processing unit in which graphics signals are processed independently of each other in the display chip. In Unity, the process of drawing a 3D scene model into a 2D picture on the screen.
Let's explain in detail the operation steps of each module in the image rendering pipeline:
The first step-vertex processing
1. When the model is finished, the model has only one center and its own left and right orientation, which is called the local coordinate system. When the model is placed in a 3D scene, each vertex has a world coordinate, so the first step in vertex processing is the process from local coordinates to world coordinates. two。 With the world coordinates, the model sees different pictures from different angles, so the next step is the process from the world coordinate system to the observation coordinate system. 3. Observing the coordinate system is still a 3D perspective, but what we see is actually a 2D plane, but with shadows, lighting, and 3D model angle rendering, we look and feel more 3D. The last step is to observe the process from the coordinate system (3D) to the projected coordinate system (2D).
The second step-- face processing
1. Just now the operation has obtained the coordinates of each vertex on the 2D plane, and the first step of the lower face processing is to connect all the vertices and assemble them into faces.
two。 Of course, after the noodles are assembled and formed, there will be places that we can't see that we don't need to render, so we need to intercept the visible faces and remove the invisible faces, so there are face interception and face culling steps.
The third step-rasterization
Rasterization is an important step in the rendering pipeline process, that is, the number of pixels, location and other information required for surface rendering can be calculated, which can also be understood as the process of splitting the face into pixels one by one.
The fourth step-pixel processing (pixel shading)
The last step is to color each pixel to form the picture we want to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.