Deferred shading translation PostScript [1]

Source: Internet
Author: User

In the crash, the translation is complete, no matter what the translation is.

For a long time, I have never been so eager to translate articles. I am outsourced every day and I am only allowed to do what I want to do at night. I should be a night-jumping animal, so that I can satisfy my preferences and habits?

Due to the coincidence, since last year, since being forced to access this technology at work, unreal's deferred shading has been getting depressed, instilled, and brainwashed. As a matter of fact, the first unfamiliarity has led to many misunderstandings. However, when I experienced his strength, I began to be unable to extricate myself and obsessed with all kinds of materials-NLP, derogatory and neutral.

Obsession does not mean superstition. In fact, I believe that unreal, no matter how good it is, is not "Orthodox" in DS ". As a result, we are timid and helpless when dealing with some problems that need to be solved. Only recently did we dare to explore and handle some necessary things. However, this may also be restricted by our project type and China's big environment, because, in any case, you have to admit that war machine 2 is a good game-at least it looks like. However, based on the same set of technologies, the game list goes in different directions in specific practices, and may also include "Region 2", "Starcraft 2", "crysis"... However, due to the extremely low efficiency of the other parts of the engine, the advantages of deferred shading's high light source and high surface number cannot be used, which makes us feel troublesome.

For any new technology, there is a question of the price to be paid when it is converted from the old to the new. How hard is it to write a deferred shading-based engine? I think it is not difficult: since March of this year, the volume has been paved, and now it has achieved remarkable results, that is, two months -- or four hours a night in two months -- note that this is not the original toolset, but the gamer class that was written at the same time, the vast majority of time, in fact, is not a waste of deferred shading itself, but a waste of this rendering system.

It is true that the deferred shading of the gamer class is still very weak, so it can only be completed through hard coding in the demo, rather than the breadth and depth like unreal, interstellar, and crysis, however, the benefits learned from the learning process may have exceeded the sum of the technologies I have learned.

Some once boast that deferred shading is powerful, and some once deferred shading is worthless, but programmers who may maintain orthodox ideas are still the majority-"No technology is correct, no technology is wrong ". There is no right or wrong technology. It depends on who the technology is used in and what the purpose is. The purpose is the first. Everything serves the purpose. The purpose is higher than everything. Deferred shading is neither powerful nor weak. Like any other technology, deferred shading only needs to avoid troubles when enjoying the benefits. In other words, the advertised solution does not solve all technologies, but the advertised solution does not solve any problems. A really good technology will always be able to discover your own problems before others.

One reason I admire deferred shading is that the general idea of deferred shading is actually the encapsulation we are tired of hearing. As a programmer, we may all need to go through this time-when you have a piece of code, it appears in 90%, but the external form is slightly different, you should make it a function.

Deferred shading is such a function, and the code segment with such a high repetition rate is exactly the same Illumination code of the traditional image lighting system. The so-called material is used to describe the external representation of an object. The material itself is meaningless, and the combination of light and material makes sense. However, if we think about it, it is not difficult to find out that the graphics technology based on the traditional lighting model is consistent in one place regardless of the differences in other aspects-that is, the code of the lighting model: diffuse is n multiplication L, specular is half-width H, and emissive is a direct mad addition, but that's all. If all the data required in this process for describing the surface is cached on several textures, and the computing is unified in the subsequent illumination process, at least the following benefits will be enjoyed:

First, the hardware occlusion can crop the light sources that do not need to be rendered. Unlike traditional pipelines, the light sources that are not displayed may also be submitted to the rendering pipeline.

Second, the final efficiency is irrelevant to the complexity of the scenario. The process of preparing material data (base pass) is very simple, so the amount of computing in this process is very small. When lighting, you face only a few textures, and almost all the work is linear.

Third, the forced pixel-based illumination system may be both a benefit and a disadvantage. The advantage is that the quality is indeed very high, and the disadvantage is that for the idea of playing games based on low quality in China, this method is not good, but it is a sense of cool-cutting. The advantage of deferred shading is its multi-faceted, multi-source, and dynamic light source, which is almost unimaginable in existing projects and the risk to be taken is no worse than the final result. The reason why Koreans dare to do this is that Korean Internet cafes and individuals generally have high configurations, China ...... As you and I know.

Assuming that you are ready to support the pixel-by-pixel illumination system, what is the reason for giving up deferred shading in the face of such temptation?

To sum up, deferred shading is the minimum price in exchange for the Quality of pixel-by-pixel illumination-but it is true that no lunch is free, and you will also pay for it ......

At the same time, if your project is to prepare quality based on the vertex by vertex, few faces, low dynamic light source, then deferred shading is definitely not suitable.

After all, online games always say goodbye to graphics. You cannot ask too much ......

 

 

 

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.