官术网_书友最值得收藏!

How it works...

Now that we've seen how the previous settings affect our scene, let's take some time aside to go over the theory behind them all. We will start explaining the very last parameter we've tweaked: the Screen Percentage.

The specifics behind this technique are quite simple: instead of rendering the scene at a fixed resolution, which would usually match that of our screens, we instead render at a different one. This second number needs to then be transformed back into the initial screen resolution, as that is a fixed variable. We are therefore left with two possible scenarios: if the initial resolution is greater than the one we are rendering the game image at, we would be talking about upscaling. If we are, on the other hand, rendering at a higher pixel density than that of our displays we get what is known as Supersampling. 

Upscaling is cheaper to render, as the engine needs to deal with a lower amount of pixels. The resulting image is of a lower quality than what we would if we weren't using this technique. Supersampling, on the other hand, takes advantage of the extra pixel count to create a higher quality image at the expense of being more demanding in terms of performance. It can be used as an anti-aliasing technique, as we are effectively reconstructing the image through this method.

Continuing with the topic of AA, let's focus once again on the different implementations that Unreal has decided to implement. There are four in total: the already-seen Supersampling, Temporal AA, FXAA, and MSAA. This last method is only available when we are using the forward renderer or developing for mobile platforms, which isn't the default state Unreal is targeting. Each method has its strengths and weaknesses, which we'll try to mention next.

FXAA is the cheapest AA method. It is one that was developed by nVidia, and it works on the rendered image that the engine outputs and not on the geometry of our levels. Because of that, it sometimes blurs the textures or operates beyond just the jagged edges we want to tweak so it can introduce unintended consequences. SSAA, or Supersampling anti aliasing, is the technique that we described before we first rendered the scene at a higher resolution and then downsampled it using an averaging filter, which makes the transition between pixels more smooth and greatly reduces jaggies. 

MSAA works in a similar way to SSAA, but in an optimized way. Instead of sampling the whole scene by rendering it at a higher resolution, MSAA takes different samples by just focusing on overlapping areas of the level. This saves up on performance while still achieving a great anti-aliasing result.

Finally, Temporal AA is a new actor in the anti-aliasing world. It is the one we use by default in Unreal, and it is a mix of a temporal filter solution, hardware anti-aliasing, and custom algorithms that work throughout the scene. It isn't as cheap to enable as FXAA, but the quality is much better overall. Choosing between one or the other is a matter of what you are trying to achieve with your project.

主站蜘蛛池模板: 大田县| 淳化县| 闸北区| 建平县| 砚山县| 鄂伦春自治旗| 磴口县| 合山市| 拜城县| 台北市| 银川市| 包头市| 诸暨市| 巴林左旗| 密山市| 砚山县| 栾川县| 乐安县| 芮城县| 南阳市| 廊坊市| 贵南县| 虹口区| 周口市| 垦利县| 华坪县| 隆林| 房产| 墨江| 江永县| 聊城市| 定陶县| 吴江市| 永定县| 孙吴县| 邯郸市| 镇沅| 铅山县| 开原市| 彝良县| 池州市|