Browse Source

Added readme images, plus some minor textual changes and fixed links

mac-autoexp
Nico de Poel 3 years ago
parent
commit
4b07aaa4ae
  1. 20
      README.md
  2. BIN
      images/camera-ppv2.png
  3. BIN
      images/camera-simple.png
  4. BIN
      images/comparison.png
  5. BIN
      images/reactive-auto.png
  6. BIN
      images/reactive-manual.png
  7. BIN
      images/reactive-none.png
  8. BIN
      images/smearing-tree.png

20
README.md

@ -1,10 +1,10 @@
# FSR2 for Unity
# FSR 2.2 for Unity
FSR2 is an advanced image upscaling and temporal reconstruction technique developed by AMD and [Github|released as open source]. It provides both high-quality anti-aliasing and the ability for games to output at high resolutions while rendering at a lower internal resolution, improving performance.
FidelityFX Super Resolution 2 (FSR2) is an advanced image upscaling and temporal reconstruction technique developed by AMD and [released as open source](https://github.com/GPUOpen-Effects/FidelityFX-FSR2). It provides both high-quality anti-aliasing and the ability for games to output at high resolutions while rendering at a lower internal resolution, improving performance.
This project aims to bring FSR2 to Unity, as an alternative to Unity's existing FXAA, SMAA and TAA anti-aliasing solutions. Compared to Unity's TAA implementation, FSR2 offers a sharper and more stable image, with a better sub-pixel detail resolve and better performance due to its reliance on upscaling. This project aims to bring FSR2 to Unity, as an alternative to Unity's existing FXAA, SMAA and TAA anti-aliasing solutions. Compared to Unity's TAA implementation, FSR2 offers a sharper and more stable image, with a better sub-pixel detail resolve and better performance due to its reliance on upscaling.
<comparson image>
![Comparison](images/comparison.png)
Rather than attempting to integrate AMD's open source C++ libraries for FSR2, this project instead reimplements the C++ backend in C# while adapting FSR2's HLSL shader code to work within Unity. This allows for maximum compatibility with the platforms and graphics APIs that Unity supports, including ones that normally wouldn't be supported by FSR2. Rather than attempting to integrate AMD's open source C++ libraries for FSR2, this project instead reimplements the C++ backend in C# while adapting FSR2's HLSL shader code to work within Unity. This allows for maximum compatibility with the platforms and graphics APIs that Unity supports, including ones that normally wouldn't be supported by FSR2.
@ -44,11 +44,11 @@ Integration generally follows the same guidelines as the FSR2 documentation on G
To apply FSR2 to a camera, simply add the `Fsr2ImageEffect` script to your camera game object. It should be placed at the bottom of the components list, to ensure that it's the last image effect in the chain. To apply FSR2 to a camera, simply add the `Fsr2ImageEffect` script to your camera game object. It should be placed at the bottom of the components list, to ensure that it's the last image effect in the chain.
<image>
![Simple Camera Setup](images/camera-simple.png)
If you have any other post-processing effects on your camera that make use of the `OnPreCull` method, then also add the `Fsr2ImageEffectHelper` script to the camera and move it up, above those other post-processing effects. Specifically: it needs to be above any script that queries the camera's viewport size properties (i.e. `rect`, `pixelRect`, `pixelWidth`/`Height`) in `OnPreCull`. Unity's `PostProcessLayer` script is a particularly good example of this. If you have any other post-processing effects on your camera that make use of the `OnPreCull` method, then also add the `Fsr2ImageEffectHelper` script to the camera and move it up, above those other post-processing effects. Specifically: it needs to be above any script that queries the camera's viewport size properties (i.e. `rect`, `pixelRect`, `pixelWidth`/`Height`) in `OnPreCull`. Unity's `PostProcessLayer` script is a particularly good example of this.
<image>
![PPV2 Camera Setup](images/camera-ppv2.png)
### Callbacks ### Callbacks
@ -74,7 +74,9 @@ Unfortunately not all community-made Unity asset packages have gotten the messag
If a moving object does not render motion vectors, you will clearly notice this as visible streaks appearing behind it. On small objects like individual particles this isn't a huge problem, but on things like dense foliage it will turn everything into a blurry, smeary soup. Again, make sure that all of your moving objects render motion vectors and complain to your third-party asset package providers if they do not. If a moving object does not render motion vectors, you will clearly notice this as visible streaks appearing behind it. On small objects like individual particles this isn't a huge problem, but on things like dense foliage it will turn everything into a blurry, smeary soup. Again, make sure that all of your moving objects render motion vectors and complain to your third-party asset package providers if they do not.
**Note for Isonzo**: The Vegetation Engine is one such package that doesn't provide motion vectors (at the moment, that I'm aware of). To work around this problem, wind effects are disabled on trees and foliage whenever TAA or FSR is enabled. This means that the foliage will remain stationary and object motion vectors are not needed to produce a sharp result.
Example of a tree waving in the wind reconstructed without motion vectors, causing visible streaking artifacts:
![Tree Smearing](images/smearing-tree.png)
### Reactive mask ### Reactive mask
@ -82,13 +84,13 @@ The reactive mask is a special input texture that tells FSR2 how much of the cur
Here is an example of a transparent particle effect upscaled by FSR2 without a reactive mask applied: Here is an example of a transparent particle effect upscaled by FSR2 without a reactive mask applied:
<image>
![No Reactive Mask](images/reactive-none.png)
The particles are poorly defined with lots of streaking and pixellation artifacts. The particles are poorly defined with lots of streaking and pixellation artifacts.
A reactive mask can be provided in two different ways. The easiest way is to make use of the auto-generate reactive mask feature. This captures the render buffer before and after transparencies are applied, and generates a reactive mask based on the difference between the two. This is a 'broad strokes' kind of approach and how well it works depends on the specific transparency effects and how they are applied. Here's what the same particle effect looks like with the auto-generated reactive mask applied: A reactive mask can be provided in two different ways. The easiest way is to make use of the auto-generate reactive mask feature. This captures the render buffer before and after transparencies are applied, and generates a reactive mask based on the difference between the two. This is a 'broad strokes' kind of approach and how well it works depends on the specific transparency effects and how they are applied. Here's what the same particle effect looks like with the auto-generated reactive mask applied:
<image>
![Auto Reactive Mask](images/reactive-auto.png)
The artifacting is mostly gone but the particles remain somewhat blurry and streaky. The artifacting is mostly gone but the particles remain somewhat blurry and streaky.
@ -100,7 +102,7 @@ The other way to provide a reactive mask is by generating one yourself. Essentia
Of course this means that you have to modify your application's shaders to output this value. The upside of this is that it will produce the most accurate and artifact-free results: Of course this means that you have to modify your application's shaders to output this value. The upside of this is that it will produce the most accurate and artifact-free results:
<image>
![Manual Reactive Mask](images/reactive-manual.png)
The manually generated reactive mask can be supplied to the `Fsr2ImageEffect` script through its Reactive Mask texture parameter. The manually generated reactive mask can be supplied to the `Fsr2ImageEffect` script through its Reactive Mask texture parameter.

BIN
images/camera-ppv2.png

After

Width: 591  |  Height: 920  |  Size: 74 KiB

BIN
images/camera-simple.png

After

Width: 604  |  Height: 968  |  Size: 82 KiB

BIN
images/comparison.png

After

Width: 1080  |  Height: 1080  |  Size: 1.2 MiB

BIN
images/reactive-auto.png

After

Width: 720  |  Height: 720  |  Size: 727 KiB

BIN
images/reactive-manual.png

After

Width: 720  |  Height: 720  |  Size: 740 KiB

BIN
images/reactive-none.png

After

Width: 720  |  Height: 720  |  Size: 752 KiB

BIN
images/smearing-tree.png

After

Width: 368  |  Height: 265  |  Size: 189 KiB

Loading…
Cancel
Save