You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/learning-paths/mobile-graphics-and-gaming/get-started-with-arm-asr/01-what-is-arm-asr.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -47,7 +47,7 @@ It includes:
47
47
48
48
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.
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:
39
37
40
38
3. Navigate to the `UE` directory in the cloned repository.
41
39
42
-
This directory contains subfolders with plugins for each supported Unreal Engineversion.
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.
43
41
44
42
4. From the directory for your version of Unreal Engine, copy the Arm ASR plugin into the `Plugins` folder in the game directory.
45
43
@@ -86,7 +84,7 @@ If Arm ASR is active, you will see Arm ASR listed as the **ThirdParty TemporalUp
Copy file name to clipboardExpand all lines: content/learning-paths/mobile-graphics-and-gaming/get-started-with-arm-asr/04-generic_library.md
+23-23Lines changed: 23 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
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
3
3
weight: 5
4
4
5
5
### FIXED, DO NOT MODIFY
@@ -14,8 +14,8 @@ Arm ASR is an optimized variant of [Fidelity Super Resolution 2](https://github.
14
14
15
15
You can integrate Arm ASR into your custom engine using one of two methods:
16
16
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.
19
19
20
20
See the following sections to learn how to configure Arm ASR:
21
21
@@ -120,7 +120,7 @@ In the following section, additional details for integrating Arm ASR are listed.
120
120
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`.
121
121
{{% /notice %}}
122
122
123
-
### HLSL-based workflows
123
+
### HLSL-Based Workflows
124
124
125
125
In an HLSL-based workflow using DirectX Shader Compiler to cross-compile to SPIR-V do the following:
126
126
@@ -132,7 +132,7 @@ In an HLSL-based workflow using DirectX Shader Compiler to cross-compile to SPIR
132
132
133
133
- The extension **VK_KHR_shader_float16_int8** should be used at runtime.
134
134
135
-
## Quality presets
135
+
## Quality Presets
136
136
137
137
The Arm ASR API provides a set of shader quality presets, to select a version of the technique that balances quality and performance:
138
138
@@ -144,7 +144,7 @@ The Arm ASR API provides a set of shader quality presets, to select a version of
144
144
145
145
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`.
146
146
147
-
## Upscaling ratios
147
+
## Upscaling Ratios
148
148
149
149
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.
150
150
@@ -196,40 +196,40 @@ table {
196
196
**Unless you are using the prebuilt shaders with the standalone VK backend**, be aware of the following definitions when integrating Arm ASR shaders:
197
197
198
198
-**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.
201
201
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.
203
203
204
204
| Define | Description |
205
205
| -------- | ------- |
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) |
210
210
| FFXM_FSR2_OPTION_APPLY_SHARPENING | If **1**, informs the shaders that RCAS (sharpening) pass will be used. |
211
211
| 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. |
213
213
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.
215
215
216
-
## Input resources
216
+
## Input Resources
217
217
218
218
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`.
219
219
220
220
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`.
| 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`. |
225
225
| 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. |
226
226
| 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. |
227
227
| 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. |
228
228
| 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`. |
229
229
230
230
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.
231
231
232
-
## Providing motion vectors
232
+
## Providing Motion Vectors
233
233
234
234
### Space
235
235
@@ -257,7 +257,7 @@ Internally, Arm ASR uses 16-bit quantities to represent motion vectors in many c
257
257
258
258
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.
259
259
260
-
## Reactive mask
260
+
## Reactive Mask
261
261
262
262
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.
263
263
@@ -271,15 +271,15 @@ If a reactive mask is not provided then an internally generated `1x1` texture wi
271
271
272
272
## Automatically generating reactivity
273
273
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.
275
275
276
276
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.
277
277
278
278
## Exposure
279
279
280
280
Arm ASR provides two values which control the exposure used when performing upscaling:
281
281
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.
283
283
284
284
2.**Exposure**: a value which is multiplied against the result of the pre-exposed color value.
285
285
@@ -338,7 +338,7 @@ Rendering performance may be slightly less than typical frame-to-frame operation
338
338
339
339
## Mipmap biasing
340
340
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:
@@ -364,7 +364,7 @@ Most of the workloads in the upscalers have been converted to fragment shaders.
364
364
365
365
## Generate prebuilt shaders
366
366
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:
0 commit comments