Skip to content

Commit 2dbb262

Browse files
authored
Merge pull request #1720 from madeline-underwood/ASR-fixes
Asr fixes
2 parents 4adb177 + 6a45150 commit 2dbb262

File tree

5 files changed

+29
-30
lines changed

5 files changed

+29
-30
lines changed

content/learning-paths/mobile-graphics-and-gaming/get-started-with-arm-asr/01-what-is-arm-asr.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ It includes:
4747

4848
The Arm ASR plugin for Unreal Engine 5 integrates into your project within minutes. Once installed, simply enable temporal upscaling, and the plugin automatically handles frame upscaling.
4949

50-
See [Using Arm ASR in Unreal Engine](../03-ue).
50+
See [Using Arm ASR in Unreal Engine](../02-ue).
5151

5252
## Custom Engine Usage
5353

content/learning-paths/mobile-graphics-and-gaming/get-started-with-arm-asr/02-ue.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ You will walk through the processes of installing Arm ASR performing some of the
1919

2020
It is recommended that you use Unreal Engine versions 5.3-5.5 through this tutorial.
2121

22-
If you have any questions, contact us at [email protected].
23-
2422
## Installing the Arm ASR plugin
2523

2624
Follow these steps to install the Arm ASR plugin in Unreal Engine:
@@ -39,7 +37,7 @@ The Third Person pack is available as an example, see below:
3937
4038
3. Navigate to the `UE` directory in the cloned repository.
4139
42-
This directory contains subfolders with plugins for each supported Unreal Engine version.
40+
The repository base contains directories containing the plugin for each supported version of Unreal Engine. Navigate to the folder corresponding to your version. For example, use `550` for Unreal Engine 5.5.
4341
4442
4. From the directory for your version of Unreal Engine, copy the Arm ASR plugin into the `Plugins` folder in the game directory.
4543
@@ -86,7 +84,7 @@ If Arm ASR is active, you will see Arm ASR listed as the **ThirdParty TemporalUp
8684
8785
![Arm ASR.Enable 1 command](images/arm_asr_enable_command.png "ArmASR.Enable 1 command")
8886
89-
## Further configuration settings
87+
## Further Configuration Settings
9088
9189
You can configure Arm ASR further in two ways:
9290

content/learning-paths/mobile-graphics-and-gaming/get-started-with-arm-asr/04-generic_library.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Using Arm ASR in a custom engine using the Generic Library
2+
title: Using Arm ASR in a Custom Engine using the Generic Library
33
weight: 5
44

55
### FIXED, DO NOT MODIFY
@@ -14,8 +14,8 @@ Arm ASR is an optimized variant of [Fidelity Super Resolution 2](https://github.
1414

1515
You can integrate Arm ASR into your custom engine using one of two methods:
1616

17-
1. [Quick integration](#quick-integration) - use the standalone backend.
18-
2. [Tight integration](#tight-integration) - use your engine's backend/renderer.
17+
1. [Quick Integration](#quick-integration) - use the standalone backend.
18+
2. [Tight Integration](#tight-integration) - use your engine's backend/renderer.
1919

2020
See the following sections to learn how to configure Arm ASR:
2121

@@ -120,7 +120,7 @@ In the following section, additional details for integrating Arm ASR are listed.
120120
The `FfxmFsr2ContextDescription` from `$ARMASR_DIR/include/host/ffxm_fsr2.h` is referenced multiple times throughout the Integration Guidelines. You should configure the `flags` field of this structure when modifying those bits, by setting the variables in `FfxmFsr2InitializationFlagBits`.
121121
{{% /notice %}}
122122

123-
### HLSL-based workflows
123+
### HLSL-Based Workflows
124124

125125
In an HLSL-based workflow using DirectX Shader Compiler to cross-compile to SPIR-V do the following:
126126

@@ -132,7 +132,7 @@ In an HLSL-based workflow using DirectX Shader Compiler to cross-compile to SPIR
132132
133133
- The extension **VK_KHR_shader_float16_int8** should be used at runtime.
134134
135-
## Quality presets
135+
## Quality Presets
136136
137137
The Arm ASR API provides a set of shader quality presets, to select a version of the technique that balances quality and performance:
138138
@@ -144,7 +144,7 @@ The Arm ASR API provides a set of shader quality presets, to select a version of
144144
145145
When creating a context, a `FfxmFsr2ShaderQualityMode` accessed via `$ARMASR_DIR/include/host/ffxm_fsr2.h` needs to be provided as part of the input settings in `FfxmFsr2ContextDescription`.
146146
147-
## Upscaling ratios
147+
## Upscaling Ratios
148148
149149
To enhance flexibility when using the technique, developers can specify both a shader quality preset and an upscaling ratio. They can select any combination of **FfxmFsr2ShaderQualityMode** and **FfxmFsr2UpscalingRatio** according to their requirements to adjust the balance between quality and performance of the application.
150150
@@ -196,40 +196,40 @@ table {
196196
**Unless you are using the prebuilt shaders with the standalone VK backend**, be aware of the following definitions when integrating Arm ASR shaders:
197197

198198
- **FFXM_GPU**. Needs to be defined globally when including the shader headers.
199-
- **FFXM_HLSL**. If defined, the logic will fallback to use the **HLSL** specific syntax (i.e types, resource declaration ...).
200-
- **FFXM_GLSL**. If defined, the logic will fallback to use the **GLSL** specific syntax (i.e types, resource declaration ...).
199+
- **FFXM_HLSL**. If defined, the logic falls back to use the **HLSL**-specific syntax, such as types and resource declaration.
200+
- **FFXM_GLSL**. If defined, the logic falls back to use the **GLSL**-specific syntax.
201201

202-
The following table shows the list of the different shader mutators that can be used. All of them must be defined with a value of 0 or 1. Which shader variant to use is guided internally by **getPipelinePermutationFlags(...)** based on things like the user's flags and shader quality.
202+
The following table shows the list of the different shader mutators that you can use. All of these must be defined with a value of 0 or 1. The shader variant to use is determined internally by the **getPipelinePermutationFlags(...)** function, based on factors such as user-defined flags and shader quality settings.
203203

204204
| Define | Description |
205205
| -------- | ------- |
206-
| FFXM_FSR2_OPTION_HDR_COLOR_INPUT | If **1**, will assume that the input color is in linear RGB. |
207-
| FFXM_FSR2_OPTION_LOW_RESOLUTION_MOTION_VECTORS | If **1**, will assume the input motion vectors texture is in low resolution |
208-
| FFXM_FSR2_OPTION_JITTERED_MOTION_VECTORS | If **1**, will assume jittered motion vectors using the same jitter offsets as the input color and depth. |
209-
| FFXM_FSR2_OPTION_INVERTED_DEPTH | If **1**, it will assume the input depth containing reversed depth values (far == 0.0f) |
206+
| FFXM_FSR2_OPTION_HDR_COLOR_INPUT | If **1**, assumes that the input color is in linear RGB. |
207+
| FFXM_FSR2_OPTION_LOW_RESOLUTION_MOTION_VECTORS | If **1**, assumes the input motion vectors texture is in low resolution |
208+
| FFXM_FSR2_OPTION_JITTERED_MOTION_VECTORS | If **1**, assumes jittered motion vectors using the same jitter offsets as the input color and depth. |
209+
| FFXM_FSR2_OPTION_INVERTED_DEPTH | If **1**, assumes the input depth containing reversed depth values (far == 0.0f) |
210210
| FFXM_FSR2_OPTION_APPLY_SHARPENING | If **1**, informs the shaders that RCAS (sharpening) pass will be used. |
211211
| FFXM_FSR2_OPTION_SHADER_OPT_BALANCED | If **1**, enables a batch of optimizations when the **Balanced** quality preset is selected. |
212-
| FFXM_FSR2_OPTION_SHADER_OPT_PERFORMANCE | If **1**, enables a batch of optimizations when the **Performance** quality preset is selected. When this is enabled then **FFXM_FSR2_OPTION_SHADER_OPT_BALANCED** will be enabled too. |
212+
| FFXM_FSR2_OPTION_SHADER_OPT_PERFORMANCE | If **1**, enables a batch of optimizations when the **Performance** quality preset is selected. When this is enabled, then **FFXM_FSR2_OPTION_SHADER_OPT_BALANCED** is enabled too. |
213213

214-
Lastly, when using an HLSL-based workflow, we also have the **FFXM_HLSL_6_2** global define. If defined with a value of **1**, this will enable the use of explicit 16-bit types instead of relying on **half** (RelaxedPrecision). The **VK_KHR_shader_float16_int8** extension is required on Vulkan.
214+
Lastly, when using an HLSL-based workflow, you also have the **FFXM_HLSL_6_2** global define. If defined with a value of **1**, this will enable the use of explicit 16-bit types instead of relying on **half** (RelaxedPrecision). The **VK_KHR_shader_float16_int8** extension is required on Vulkan.
215215

216-
## Input resources
216+
## Input Resources
217217

218218
Arm ASR is a temporal algorithm, and therefore requires access to data from both the current and previous frame. The following table enumerates all external inputs required by it, with most function names available in `$ARMASR_DIR/include/host/ffxm_fsr2.h`.
219219

220220
The resolution column indicates if the data should be at 'rendered' resolution or 'presentation' resolution. 'Rendered' resolution indicates that the resource should match the resolution at which the application is performing its rendering. Conversely, 'presentation' indicates that the resolution of the target should match that which is to be presented to the user. All resources are from the current rendered frame, for Vulkan applications all input resources should be transitioned to [`VK_ACCESS_SHADER_READ_BIT`](https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkAccessFlagBits.html) respectively before calling `ffxmFsr2ContextDispatch`.
221221

222222
| Name | Resolution | Format | Type | Notes |
223223
| ----------------|------------------------------|------------------------------------|-----------|------------------------------------------------|
224-
| Color buffer | Render | `APPLICATION SPECIFIED` | Texture | The current frame’s color data for the current frame. If HDR, enable `FFXM_FSR2_ENABLE_HIGH_DYNAMIC_RANGE` in `FfxmFsr2ContextDescription`. |
224+
| Color buffer | Render | `APPLICATION SPECIFIED` | Texture | The current frame’s color data. If HDR, enable `FFXM_FSR2_ENABLE_HIGH_DYNAMIC_RANGE` in `FfxmFsr2ContextDescription`. |
225225
| Depth buffer | Render | `APPLICATION SPECIFIED (1x FLOAT)` | Texture | The depth buffer for the current frame. The data should be provided as a single floating point value, the precision of which is under the application's control. Configure the depth through the `FfxmFsr2ContextDescription` when creating the `FfxmFsr2Context`. If the buffer is inverted, set `FFXM_FSR2_ENABLE_DEPTH_INVERTED` flag ([1..0] range). If the buffer has an infinite far plane, set the `FFXM_FSR2_ENABLE_DEPTH_INFINITE`. If the application provides the depth buffer in `D32S8` format, then it will ignore the stencil component of the buffer, and create an `R32_FLOAT` resource to address the depth buffer. |
226226
| Motion vectors | Render or presentation | `APPLICATION SPECIFIED (2x FLOAT)` | Texture | The 2D motion vectors for the current frame, in **[<-width, -height> ... <width, height>]** range. If your application renders motion vectors with a different range, you may use the `motionVectorScale` field of the `FfxmFsr2DispatchDescription` structure to adjust them to match the expected range for Arm ASR. Internally, Arm ASR uses 16-bit quantities to represent motion vectors in many cases, which means that while motion vectors with greater precision can be provided, Arm ASR will not benefit from the increased precision. The resolution of the motion vector buffer should be equal to the render resolution, unless the `FFXM_FSR2_ENABLE_DISPLAY_RESOLUTION_MOTION_VECTORS` flag is set when creating the `FfxmFsr2Context`, in which case it should be equal to the presentation resolution. |
227227
| Reactive mask | Render | `R8_UNORM` | Texture | As some areas of a rendered image do not leave a footprint in the depth buffer or include motion vectors, Arm ASR provides support for a reactive mask texture. This can be used to indicate to the technique where such areas are. Good examples of these are particles, or alpha-blended objects which do not write depth or motion vectors. If this resource is not set, then Arm ASR's shading change detection logic will handle these cases as best it can, but for optimal results, this resource should be set. For more information on the reactive mask please refer to the [Reactive mask](#reactive-mask) section. |
228228
| Exposure | 1x1 | `R32_FLOAT/ R16_FLOAT` | Texture | The exposure value computed for the current frame. This resource may be omitted if the `FFXM_FSR2_ENABLE_AUTO_EXPOSURE` flag in the `FfxmFsr2ContextDescription` structure when creating `FfxmFsr2Context`. |
229229

230230
All inputs that are provided at Render Resolution, except for motion vectors, should be rendered with jitter. By default, Motion vectors are expected to be unjittered unless the `FFXM_FSR2_ENABLE_MOTION_VECTORS_JITTER_CANCELLATION` flag is present.
231231

232-
## Providing motion vectors
232+
## Providing Motion Vectors
233233

234234
### Space
235235

@@ -257,7 +257,7 @@ Internally, Arm ASR uses 16-bit quantities to represent motion vectors in many c
257257

258258
Arm ASR will perform better quality upscaling when more objects provide their motion vectors. It is therefore advised that all opaque, alpha-tested and alpha-blended objects should write their motion vectors for all covered pixels. If vertex shader effects are applied, such as scrolling UVs, these calculations should also be factored into the calculation of motion for the best results. For alpha-blended objects it is also strongly advised that the alpha value of each covered pixel is stored to the corresponding pixel in the [reactive mask](#reactive-mask). This will allow the technique to perform better handling of alpha-blended objects during upscaling. The reactive mask is especially important for alpha-blended objects where writing motion vectors might be prohibitive, such as particles.
259259

260-
## Reactive mask
260+
## Reactive Mask
261261

262262
In the context of Arm ASR, the term "reactivity" means how much influence the samples rendered for the current frame have over the production of the final upscaled image. Typically, samples rendered for the current frame contribute a relatively modest amount to the result computed by the algorithm; however, there are exceptions. As there is no good way to determine from either color, depth or motion vectors which pixels have been rendered using alpha blending, Arm ASR performs best when applications explicitly mark such areas.
263263

@@ -271,15 +271,15 @@ If a reactive mask is not provided then an internally generated `1x1` texture wi
271271

272272
## Automatically generating reactivity
273273

274-
To help applications generate the reactive mask, we provide an optional utility pass. Under the hood, the API launches a fragment shader which computes these values for each pixel using a luminance-based heuristic.
274+
To help applications generate the reactive mask, there is an optional utility pass. Under the hood, the API launches a fragment shader which computes these values for each pixel using a luminance-based heuristic.
275275

276276
To do this, the applications can call the `ffxmFsr2ContextGenerateReactiveMask` (`$ARMASR_DIR/include/host/ffxm_fsr2.h`) function and should pass two versions of the color buffer: one containing opaque only geometry, and the other containing both opaque and alpha-blended objects.
277277

278278
## Exposure
279279

280280
Arm ASR provides two values which control the exposure used when performing upscaling:
281281

282-
1. **Pre-exposure**: a value by which we divide the input signal to get back to the original signal produced by the game before any packing into lower precision render targets.
282+
1. **Pre-exposure**: a value by which you can divide the input signal to get back to the original signal produced by the game before any packing into lower precision render targets.
283283

284284
2. **Exposure**: a value which is multiplied against the result of the pre-exposed color value.
285285

@@ -338,7 +338,7 @@ Rendering performance may be slightly less than typical frame-to-frame operation
338338

339339
## Mipmap biasing
340340

341-
Applying a negative mipmap biasing will typically generate an upscaled image with better texture detail. We recommend applying the following formula to your Mipmap bias:
341+
Applying a negative mipmap biasing will typically generate an upscaled image with better texture detail. It is recommended that you apply the following formula to your Mipmap bias:
342342

343343
``` CPP
344344
mipBias = log2(renderResolution/displayResolution) - 1.0;
@@ -364,7 +364,7 @@ Most of the workloads in the upscalers have been converted to fragment shaders.
364364

365365
## Generate prebuilt shaders
366366

367-
We provide a helper script to generate prebuilt shaders which are used for standalone backend. Make sure python is installed, and run it with the following command:
367+
There is a helper script provided to generate prebuilt shaders which are used for standalone backend. Make sure python is installed, and run it with the following command:
368368

369369
```bash
370370
python $ARMASR_DIR/tools/generate_prebuilt_shaders.py

content/learning-paths/mobile-graphics-and-gaming/get-started-with-arm-asr/05-get-help.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Acknowledgements, Licensing, and Support
2+
title: Acknowledgements, Licensing, and Additional Resources
33
weight: 6
44

55
### FIXED, DO NOT MODIFY
@@ -20,7 +20,7 @@ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR I
2020

2121
## Additional Resources
2222

23-
The following links provide additional information about Arm ASR.
23+
The following links provide additional information about Arm ASR:
2424

2525
* [Arm ASR on Arm Developer Hub](https://www.arm.com/developer-hub/mobile-graphics-and-gaming/accuracy-super-resolution).
2626
* [Arm ASR Manga Comic](https://developer.arm.com/Mobile%20Graphics%20and%20Gaming/FeaturedContent/Mali%20Manga/FeaturedContent-MaliManga-Volume4).

content/learning-paths/mobile-graphics-and-gaming/get-started-with-arm-asr/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ armips:
2424
- Immortalis
2525
tools_software_languages:
2626
- Unreal Engine
27+
- Mobile
2728
operatingsystems:
2829
- Android
2930

0 commit comments

Comments
 (0)