Analysis of the changes brought by directx11 technology to the graphic industry (I) Analysis of the changes brought by directx11 technology to the graphic Industry
In October 23, 2009, Microsoft launched Windows 7, the latest operating system. Compared with the previous Vista system, Windows 7 has made great progress and improved its core execution efficiency, new technologies such as DirectX 11 are added. Microsoft launched a new graphic API-DirectX 11 with a clear goal: to make full use of graphics card resources to achieve higher execution efficiency in gaming and general-purpose computing. Today, this article will take you through an analysis of the double experience that DirectX 11 technology brings to the graphics industry and gaming players. At the same time, we also let more people know whether they need a graphics card that supports DirectX 11. Which of the following is the most suitable.
● The Impact of DirectX on GPU Development
DirectX is not a simple graphic API. It is a widely used API developed by Microsoft and contains direct graphics (Direct 3D + Direct Draw), direct input, direct play, direct sound, direct show, direct setup, direct media objects, and other components, it provides a complete set of Multimedia Interface solutions. Its outstanding performance in 3D graphics makes its other components almost ignored.
The outstanding performance of direct graphics and Microsoft's influence make countless hardware vendors fear and constantly follow the changes to develop new graphics processor architectures. At the same time, ATI and NVIDIA are still following the pace of DirectX so far, realizing that if any game-related hardware vendor is abandoned by Microsoft, the consequences will be unimaginable.
Everyone is imagining the future of DirectX technology.
In the past several DirectX replicas, there were several major updates, such as the well-known changes from DirectX 7 to DirectX 8 to DirectX 9 to DirectX 10, this is also the reason for making the chip bigger. The transfer to DirectX 8 makes the programmable hardware into the pipeline a dual structure. For DirectX 9 vertex processing and pixel processing, the real programmable processor swap. The transfer to DirectX 10 requires a fundamental reform of the GPU architecture to achieve more flexible programmability.
Therefore, the change of the generation and the GPU production are all related to fundamental reforms, which basically focus on DirectX, the most important graphic API. In particular, the architecture reform in the DirectX 10 era has fundamentally changed the essence of GPU. The API reform from DirectX 8 to DirectX 9 affects the reform of the GPU architecture, and the turning point of the huge change in the architecture is DirectX 10.
In the DirectX 10 era, the coloring unit is going to be unified.
In the DirectX 10 era, we are very fortunate to see pixel shader, vertex shader, and geometry shader ), three specific hardware logics are integrated into a full-featured shader. However, we also found that while GPU performance was improved, the chip scale was scaled up more quickly, which had to worry about GPU power consumption and hot issues in the future.
In fact, there are two main reasons for Chip changes. One reason is the increase in performance. More resources are required to improve the computing performance, which increases the number of transistors. The other is to develop programmability. A single programmable processor needs to include fixed-function hardware for individual processing, which will inevitably increase the number of transistors. However, this will cause a significant decline in performance. Therefore, computing resources need to be greatly increased to maintain the same performance. The result is that the GPU needs to be switched from a fixed hardware to a programmable hardware, and the number of transistors and core sizes also increase.
Today, we have seen DirectX 11, which provides a balanced solution. DirectX 10 has brought a lot of brilliant new effects, but the abuse of various effects eventually overwhelmed the GPU. When DirectX 10 experienced various twists and turns and bottlenecks were full, Microsoft began to focus on how to improve algorithms and efficiency, rather than simply adding new effects or improving model complexity. Therefore, we can see that DirectX 11 has focused on how to use the smallest hardware overhead to achieve the best rendering effect with the assistance of advanced graphics technology.
● New features brought about by DirectX 11
DirectX 11, as a new set of graphic APIs, provides graphic developers and users with great imagination. It also reduces the development difficulty and saves hardware resources, especially the latter two features, is the most significant difference between DirectX 11 and DirectX.
At the 2009 nvision conference, Microsoft leaked a large number of details about DirectX 11. At this time, DirectX 11 was completely mature and supported by hardware vendors, so it was listed together with the win7 operating system. At the same time, we can conduct some in-depth research with the help of the slides released at the Siggraph and gamefest 2008 conference. In addition, the early release of dx11 features is also helpful for dx10 and dx10.1 Hardware Users, because AMD and NVIDIA can develop appropriate driver support in advance.
Nvision data for 2008
Looking back at the replacement process of DirectX, almost all of them have a disruptive impact on the GPU architecture, most of which require the GPU to change the existing shader cell structure, or to add resources to the shader unit, these improvements aim to increase the number of GPU commands, increase the number of registers, increase the texture size, and increase the texture accuracy. This improvement will inevitably lead to an increase in the number of transistors, which means that each shader unit inside the GPU has become larger.
After DirectX 11 was released, it was found that Microsoft did not make significant improvements in the Shader Model. Although the version was upgraded to Shader Model 5.0, but more importantly, it can be regarded as the completion of DirectX 10 and DirectX 10.1 functions. You can also think of it as a superset of DirectX 10 and DirectX 10.1. If you think about it from another angle, the DirectX 11 we see today is the perfect DirectX 10 format Microsoft wants.
DirectX 11 has brought new features for different aspects. Currently, through existing data analysis, it has the following improvements:
New features brought about by DirectX 11
● The version of The Shader Model is upgraded to Shader Model 5.0. It adopts the object-oriented concept and supports double precision data. ● Tessellation the surface subdivision technology was officially supported by Microsoft and gradually matured. ● multithreading multi-threaded processing makes it no longer embarrassing for the graphic processing to face the multi-threaded programming environment. ● Microsoft proposed its own compute shader general computing concept, bringing GPU general-purpose computing to a new peak. ● The New Texture compression texture compression solution brings hardware resource savings in environments with extremely low image quality loss.
In today's analysis, we will focus on tessellation surface subdivision technology, because this is one of the most prominent features of DirectX 11 and a technology that has a profound impact on graphic operations, we will also mention other features of DirectX 11.
● Tessellation Technical Analysis
Tessellation can also be translated as split-embedded Subdivision Surface technology. In fact, this is a special computing module introduced by ATI as early as the first generation of DirectX 10 graphics core r600, that is, hd2900xt. From the hd2000 series to the latest hd5000 series, the entire 4-generation graphics card supports this technology. Even if there is still no game to support this technology, ATI still does not give up on this technical effort-it can be seen from its name that Ati's painstaking efforts in this technology: tessell-Ati-on.
Tessellation is mainly implemented by a module programmable tessellator inside the GPU. Based on the existing vertices in the 3D model and different requirements, interpolation is performed based on different rules to split a Polygon into multiple polygon. This process can be controlled by programming, which can solve the contradiction between efficiency and effect. Tessellation can automatically create hundreds of times the original model's vertices. These are not virtual vertices, but actual vertices. The effect is equivalent to being directly designed during modeling.
Tessellation workflow Trilogy
Obviously, tessellation in DirectX 11 makes the snow-capped mountains more visible, far better than the parallax ing texture technology used in DirectX 10. Although the latter can provide some visual deception when watching from a distance, it is still far different from the true feeling created by tessellation technology. The analysis diagram we use comes from a demo released by AMD at r600. This demo is different from the previous design method. It does not highlight the main character and plays down the background, because before tessellation technology is available, the generation and subsequent computation of a large number of vertices puts a lot of pressure on the geometric processing of the GPU and cannot run smoothly. tessellation technology has changed this mode.
In addition to significantly improving the model details and image quality, tessellation attracts programmers most: they do not need to manually design complex models with millions of triangles, but simply draw a contour, the rest can be handed over to tessellation technology to automatically split and embed, greatly improving the development efficiency. Moreover, simple models can greatly save the video memory overhead during GPU processing, greatly improving the rendering speed.
● Review of tessellation technology History
Tessellation technology can be traced back to the dx8 era at the earliest. At that time, ATI had already joined hands with Microsoft to develop truform (n-patch) technology, the predecessor of tessellation, and was incorporated into dx8.1.
On March 13, 2001, ATI announced the technical details of truform, and the media also reported the technology. Simply put, the truform technology is to convert the triangle in the game into a surface inside the chip and then convert it into a new triangle, which can be displayed in the scene.
When the triangle information uses a graphics chip, truform technology starts to work. It creates N-patches to form an N-patch grid.
The N-patch mesh is a surface defined by linear triangle information. N-patches puts two control points on each side of a triangle, which generates six new vertices. These control points are on a separate plane and can be located under or above the original triangle. The vertex vector information stored in the original triangle can determine the position of the control point.
N-patch technology
Of course, this is not a simple task, and it is the use of truform technology. At that time, people thought it was the only weapon of ATI's next-generation video radeon2. When the GPU computing capability was extremely limited at that time, the N-patch technology could greatly improve the details and Display Effect of 3D models.
However, it encountered some very regrettable mistakes, resulting in the end of the technology to be abandoned by users. Because the n-patch technology is more suitable for the surface of dolphins, racing cars and other curved models, if this technology is applied to tanks and other models that do not need to be curved, the effect will become quite funny.
3D assembly line changes brought about by tessellation Technology
N-patch/truform technology has been marginalized by the market, but ATI has not abandoned its development and research. Finally, in 2005, there was a turning point. In the collaboration between Microsoft and ATI, the graphic chip xnos designed specifically for xbox360, the improved N-patch/truform technology came to the fore, this time, ATI named it tessellation, which we are familiar with, and translated it as "Split-embedded" and "subdivided surface". It also represents Ati's indelible contribution to this technology.
● Tessellation Technical Analysis
The English word "tessellation" is translated as "Mosaic", that is, a new vertex is automatically embedded between the vertex and the vertex. Tessellation is often translated as a "Subdivision Surface" because after a large number of new vertices are inserted automatically, the surface of the model is very delicate and looks smoother and more dense. It is a technology that can automatically create vertices inside the graphics chip, refine the model, and achieve better image effects. Tessellation can automatically create hundreds of times the original model's vertices. These are not virtual vertices, but actual vertices. The effect is equivalent to being directly designed during modeling.
In-depth exploration of Curved Surface Subdivision in the graphic Industry
Before that, people have been exploring the low-cost polygon Operation Method for nearly 10 years. From the initial fan operations on triangles to the subsequent split and collision checks, these methods can achieve the effect of surface subdivision, however, resource consumption is too large to be controlled. This time, Microsoft added the hardware tessellation unit in DirectX 11, and we can see it as a result of the fact that the surface subdivision technology has been honed for a long time. Although it is not in line with the design direction of the general processing unit, if the input and performance of the computing transistor return, the independent hardware tessellation Unit is currently the best choice.
The tessellation technology is fully programmable and provides a variety of interpolation vertex locations to create various surfaces:
1. the N-patch surface is the same as the truform technology in the past. It is determined based on the normal of the base triangle vertex. 2. the position of the vertex is calculated based on the formula of the besell curve. 3. b-spline, OpenGL, and nubs curves (these curves are common curves in the CAD field and can be generated using tools in Maya) 4. the recursive algorithm is used to approach the Catmull-Clark extreme surface.
Examples of different surface subdivision Effects
The tessellation technology was initially used to "subdivide the surface". As the technology was incorporated into the dx11 category, after a wide range of promotion, there were more and more interpolation vertex algorithms, so it became more and more widely used, it has produced many very creative applications.
Tessellation technology is often used with displacement maps (texture replacement) technology to transform a plane texture map into a three-dimensional geometric image, greatly enhancing the authenticity of 3D models or scenes.
In addition to significantly improving the model details and image quality, tessellation attracts programmers most: they do not need to manually design complex models with millions of triangles, but simply draw a contour, the rest can be handed over to tessellation Technology for Automatic Mosaic, greatly improving the development efficiency. Moreover, simple models can greatly save the video memory overhead while significantly improving the rendering speed.
● DirectX 11 introduces programmable Curved Surface Subdivision Pipeline
In the era of directx10, geometry shader and stream out are the most new features. The former can input some data and generate some triangles, while the latter can cut off pixel shader, after completing the geometry shader, it will directly output back to the input handler er, which means GPU recursion and iteration can be performed.
Compared with DirectX 10, DirectX 11 does not change the Shader Model much, but adds five new instruction sets. However, for game developers, the development of Shader Model 5.0 functions and subroutine code is easier and more convenient than the previous generation. The five new instruction sets are added to allow programmers to access and operate data more flexibly.
In Shader Model 5.0, shader unifies the types, except vertex shader, pixel shader, and geometry shader, which are already available in version 4.0, we also added three new shade types, namely, hull shader, compute shader, and domain shader, to improve the surface subdivision pipeline.
Ati's hd2000 and above graphics cards all have the tessellation function, but they are not compatible with the tessellation Technology in dx11. This is because Microsoft did not copy the tessellation Technology of r600 to dx11, but optimized it so that it can be perfectly integrated with the rendering process, more polygon and curved surfaces can be subdivided more efficiently.
Unlike the isolated tessellator module in the dx9c/dx10 era, in dx11, Microsoft added two completely new coloring devices to fully cooperate with tessellator, which are located before and after the mosaic.
The hull shader is used to control the number of automatically generated vertices and algorithms, that is, the subdivision level of tessellator, and then handed over to tesselator for Mosaic processing, finally, the domain shader generates the required surface according to the program requirements, and automatically translates and replaces the normal map to generate a new model.
Compared with the tessellation Technology in DX9/10, the two new pasters in dx11 are dominated by the Unified rendering architecture, so the processing capability is very rich, dx11 tessellation is not only more efficient, but also richer in segments. However, higher levels of segmentation impose demanding requirements on the processing capabilities of the tessellator module itself, which requires chip manufacturers to consider carefully at the beginning of design.● Comprehensive application of tessellation and displacement Mapping
The combination of displacement mapping and tessellation has many advantages. Although the two have no principle at all.
Texture replacement is a complex surface operation by combining Vs and Alpha. Basically, texture replacement does not add new polygon, even if it is added, it is only used as the Operation Point. The surface subdivision is different. It sets a new vertex in a known polygon to achieve the fan operation to add a polygon. One of the two technologies focuses on alpha and vertex movement, and the other focuses on directly increasing the number of polygon. These are two completely different methods for implementing complex surface details.
Combined Application of tessellation and displacement Mapping
To put it simply, displacement ing aims to use tessellation to change the appearance of Multi-deformation, not just smooth edges and edges.
As you can see, displacement ing allows a plane's mesh surface to have a different shape through tessellation and displacement mapping (the above example is a rolling hill ), as long as displacement mapping is used to map the image to the vertex of the mesh surface, the vertex of the mesh surface can be upgraded/downgraded to different relative heights. The same mesh surface can form different shapes.
Combined Application of tessellation and displacement Mapping
Unlike the previous bump mapping mainly in the grating phase, displacement mapping generates a true appearance composed of more polygon, however, bump mapping is a fraudulent method and a performance compromise solution. It cannot generate different shapes. Using displacement mapping to implement rich surface details has many advantages.
Finally, the models rendered by Combining Displacement mapping and tessellation are similar to the native models in the tools used by the artist, in this way, artists do not have to create models of different levels of geometric details, and do not need to perform such general work repeatedly.
● New multi-thread rendering technology
Although the hyper-threading concept has been developed in the CPU field for decades, most programmers have not started to care about parallelism of programs until many core CPUs have become popular in recent years, before that, most common code was a simple single thread. It was very difficult to find and mine the performance improvements brought about by multithreading in these codes.
To change this situation, the DirectX 11 feature also includes the support for multi-threading ). Yes, no matter DirectX 10 or DirectX 11, all the color information will eventually be raked and displayed on the Computer Display (whether in linear or synchronous mode ), however, DirectX 11 has added support for multithreading technology.
Multithreading changes from DirectX 10 to DirectX 11
Thanks to this, applications can synchronously create useful resources or manage statuses, and send extraction commands from all private threads, which is undoubtedly more efficient. This multithreading technology of dx11 may not accelerate the graphics subsystem (especially when our GPU resources are limited), but it can improve the efficiency of thread-based game startup, in addition, the potential of increasing the number of desktop CPU cores can be utilized.
Multi-threaded rendering 1
In DirectX 11, Microsoft divided a single Direct 3D device into three independent interfaces: Device and immediate context) and deferred context ).
Multi-threaded rendering 2
All three are distributed to independent threads, and the device and deferred context can allocate multiple threads to send tasks waiting for execution to the immediate context or rendering thread. Such a design can pre-access the resources required for Graph Generation. At the same time, the CPU can also use the multi-thread processing of the video card to speed up DirectX processing, reduce the CPU response time, so that the game is no longer limited by the CPU bottleneck.
Analysis of the changes brought by directx11 technology to the graphic industry (I) Analysis of the changes brought by directx11 technology to the graphic industry []