- Unreal Engine 4 Shaders and Effects Cookbook
- Brais Brenlla Ramos John P. Doran
- 529字
- 2021-06-24 14:12:17
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.
- Mastering Visual Studio 2017
- 摩登創(chuàng)客:與智能手機和平板電腦共舞
- 垃圾回收的算法與實現(xiàn)
- Android 7編程入門經(jīng)典:使用Android Studio 2(第4版)
- Python爬蟲開發(fā)與項目實戰(zhàn)
- 網(wǎng)店設計看這本就夠了
- 微信小程序開發(fā)解析
- Python數(shù)據(jù)可視化之Matplotlib與Pyecharts實戰(zhàn)
- Getting Started with Gulp
- Go語言精進之路:從新手到高手的編程思想、方法和技巧(1)
- Access 2010數(shù)據(jù)庫應用技術實驗指導與習題選解(第2版)
- Java Web應用開發(fā)給力起飛
- Python Machine Learning Cookbook
- Microsoft HoloLens By Example
- 現(xiàn)代C++語言核心特性解析