Unity interview questions daily 5 questions 04

16. Rendering pipeline process, MVP transformation, etc., various tests

The rendering pipeline process is also called the rendering pipeline; this question divides the rendering process into three stages according to "Render-Time Rendering, Third Edition": application stage ---> geometry stage ---> rasterization stage. (Note that each stage itself is also an assembly line system)

mvptransformation

Before explaining the MVP transformation, we need to know the meaning of these letters.

M (Modle) model transformation: convert model space to world space

V (View) observation transformation: convert world space to observation space

P (Projection) projection transformation: convert observation space to clipping space

According to "Introduction to Unity Shader", you can see the change process more intuitively.

Various tests

 Don't quite understand. Maybe it refers to Unity Test Runner, the unit testing tool that comes with Unity Editor?

For details, see Unity Interview Questions Daily 5 Questions 04 Supplement


17. Shadowmap implementation

In real-time rendering, one of the most commonly used techniques for implementing shadows is called Shadow Map, also known as shadow map or shadow map texture. The principle is actually to place a camera at the light source, generate a depth map through the camera, and then compare the depth of the currently rendered point with the depth in the depth map when rendering an object that needs to receive shadows.

Shadowmap will also bring some problems such as shadow acne, floating shadows, etc. We will learn more about them later.


18. How to implement shadows efficiently

Unity has two shadow implementation methods: baked shadows and real-time shadows. Baked shadows are cheap and have poor results. Real-time shadows are expensive but effective.

Baked shadows can achieve most static shadows. After all, real-time shadows consume too much, and we are very worried that the game will not be able to run in the later stages, so a shadow optimization solution is needed at this time. Adjustments can be made to the shadows quality panel. shadow resolution/shadow cascades/shadow distance (visible shadow distance).

The author also checked many other solutions and found a way to reduce the memory by more than 40 times, which was added in Daily Question 04.


19. The difference between Cpu and GPU, how to design

CPU is the central processing unit, and GPU is the graphics processing unit.

 

For details on the design, see Unity Interview Questions Daily 5 Questions 04 Supplement


20. Several anti-aliasing algorithms

Although MSAA reduces the sampling process, the amount of data (Color\Depth\Stencil) will still be doubled. Not suitable for delayed rendering.

Based on MSAA, CSAA uses more Coverage data to achieve higher anti-aliasing effects.

FXAA: A screen post-processing algorithm; steps: extract edge pixels; blend edge pixels with surrounding pixels; advantages: good performance overhead. The disadvantage is that the picture will become blurry.

TAA: It is divided into two processes: sampling and synthesis, but there may be ghosting problems at the same time.

SSAA/SMAA/DLSS to be added

Guess you like

Origin blog.csdn.net/Anyo1n/article/details/126785605