- 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.
- Java語(yǔ)言程序設(shè)計(jì)
- Visual Basic程序開(kāi)發(fā)(學(xué)習(xí)筆記)
- HTML5游戲開(kāi)發(fā)案例教程
- SAP BusinessObjects Dashboards 4.1 Cookbook
- R語(yǔ)言與網(wǎng)絡(luò)輿情處理
- NoSQL數(shù)據(jù)庫(kù)原理
- Learning Unreal Engine Android Game Development
- 0 bug:C/C++商用工程之道
- Odoo 10 Implementation Cookbook
- JSP程序設(shè)計(jì)實(shí)例教程(第2版)
- Clean Code in C#
- 實(shí)戰(zhàn)Java高并發(fā)程序設(shè)計(jì)(第2版)
- Java EE 7 with GlassFish 4 Application Server
- Oracle 12c從入門(mén)到精通(視頻教學(xué)超值版)
- Python Digital Forensics Cookbook