Advertisement
Guest User

Untitled

a guest
Aug 25th, 2023
917
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.84 KB | None | 0 0
  1. # NVIDIA Unreal Engine DLSS Super Resolution / DLAA Plugin
  2.  
  3. ## DLSS3 and the NVIDIA Unreal Engine DLSS Super Resolution Plugin
  4.  
  5. The NVIDIA *DLSS Super Resolution/Ray Reconstruction/DLAA* plugin is part of a wider suite of related NVIDIA performance and image quality improving technologies and corresponding NVIDIA Unreal Engine plugins:
  6.  
  7. - NVIDIA *Deep Learning Supersampling Frame Generation (DLSS-FG)* boosts frame rates by using AI to render additional frames. *DLSS-FG* requires a Geforce RTX 40 series graphics card.
  8. - NVIDIA *Deep Learning Supersampling Super Resolution (DLSS-SR)* boosts frame rates by rendering fewer pixels and using AI to output high resolution frames. *DLSS-SR* requires an NVIDIA RTX graphics card.
  9. - NVIDIA *Deep Learning Anti-Aliasing (DLAA)* is used to improve image quality. *DLAA* requires an NVIDIA RTX graphics card.
  10. - NVIDIA *Image Scaling (NIS)* provides best-in class upscaling and sharpening for non-RTX GPUs, both NVIDIA or 3rd party. Please refer to the NVIDIA *Image Scaling* Unreal Engine plugin for further details.
  11. - ***Coming Soon!*** - NVIDIA *Ray Reconstruction (DLSS-RR)* enhances image quality by generating high-quality pixels between sampled rays for intensive ray traced content. This feature requires a GeForce RTX graphics card.
  12.  
  13. The NVIDIA Unreal Engine DLSS-SR/DLSS-RR/DLAA plugin (documented here) provides:
  14.  
  15. - DLSS Super Resolution (DLSS-SR)
  16. - Deep Learning Anti-Aliasing (DLAA)
  17. - ***Coming Soon!*** - DLSS Ray Reconstruction (DLSS-RR)
  18.  
  19. The NVIDIA Unreal Engine Streamline plugin (available separately) provides:
  20.  
  21. - DLSS Frame Generation (also called DLSS-G or DLSS-FG)
  22. - NVIDIA Reflex
  23.  
  24. The NVIDIA Unreal Engine NIS plugin (available separately) provides:
  25.  
  26. - NVIDIA Image Scaling
  27.  
  28. # Quickstart
  29.  
  30. Please refer to the relevant section in this document for additional details.
  31.  
  32. 1. Enable the *NVIDIA DLSS Super Resolution/Ray Reconstruction/DLAA* plugin in the Editor, then restart the editor.
  33. 2. DLSS-SR/DLSS-RR/DLAA in the Editor: enable the following settings in the Project Plugin settings
  34. 1. Enable DLSS to be turned on in Editor viewports (it is off by default)
  35. 2. In the Viewport Options (triple-bar ≡ menu in the top left corner), set the Screen Percentage option to control the upscale percentage. Not all screen percentages are supported. Values in the range 50-67 are recommended for DLSS, 100 for DLAA, and 50-100 for DLSS-RR.
  36. 3. DLSS-SR/DLSS-RR/DLAA in [Blueprint](#dlss-blueprints):
  37. 1. The `EnableDLSS` DLSS blueprint library function provides a convenient method for setting the console variables for DLSS Super Resolution. This is recommended to be used when integrating support into a project's user interface and settings.
  38. 2. The `Enable DLSS-RR` DLSS blueprint library function provides a convenient method for setting the console variables for DLSS Ray Reconstruction. This is recommended to be used when integrating support into a project's user interface and settings.
  39. 3. The `GetDlssModeInformation` DLSS blueprint library function can be used to query optimal screen percentage to use for given quality mode. The screen percentage can then be used with `r.ScreenPercentage` in an `ExecuteConsoleCommand` node.
  40. 4. DLSS-SR/DLSS-RR/DLAA in PIE: `Edit -> Editor Preferences -> Performance` turn off "Override game screen percentage settings with editor settings in PIE" (it is on by default)
  41. 5. DLSS-SR in Game: make sure that the following [console variables](#command-line-options-and-console-variables-and-commands) are set to enable DLSS Super Resolution:
  42. 1. r.NGX.Enable 1 (can be overriden on the command line with -ngxenable)
  43. 2. r.NGX.DLSS.Enable 1
  44. 3. r.ScreenPercentage 66.7
  45. 6. DLAA in Game: make sure that the following [console variables](#command-line-options-and-console-variables-and-commands) are set to enable DLAA
  46. 1. r.NGX.Enable 1 (can be overriden on the command line with -ngxenable)
  47. 2. r.NGX.DLSS.Enable 1
  48. 3. r.ScreenPercentage 100
  49. 7. DLSS-RR in Game: DLSS-RR requires all denoisers to be deactivated. This is most true when the project uses ray tracing. Make sure that the following cvars are set.
  50. 1. r.NGX.DLSS.denoisermode 1
  51. 2. r.Lumen.Reflections.BilateralFilter 0 - *In engine versions 5.2 and 5.3, changing this setting at runtime via console or blueprints can lead to engine runtime assertions if the resolution later changes. It should be set only by changing a config file such as DefaultEngine.ini. So if you wish to re-enable r.Lumen.Reflections.BilateralFilter when DLSS-RR is disabled, it would require a config setting change and engine restart.*
  52. 3. r.Lumen.Reflections.ScreenSpaceReconstruction 0
  53. 4. r.lumen.Reflections.Temporal 0
  54. 5. r.Shadow.Denoiser 0
  55.  
  56. 8. Check the log for `LogDLSS: NVIDIA NGX DLSS supported 1`
  57. 9. (Optionally) Enable the DLSS on screen indicator in the bottom left of the screen via `DLSS\Source\ThirdParty\NGX\Utils\ngx_driver_onscreenindicator.reg` to verify that DLSS is active
  58.  
  59. # Troubleshooting
  60.  
  61. ## System requirements
  62.  
  63. - Windows 10, 64 bit
  64. - at least version v1709, Windows 10 Fall 2017 Creators Update 64-bit.
  65. - NVIDIA Geforce Driver
  66. - Required: driver issued after March 3, 2022 (for instance 512.15)
  67. - NVIDIA RTX GPU (GeForce, Titan or Quadro) with [DLSS Super Resolution](https://www.nvidia.com/en-us/geforce/technologies/dlss/) support
  68. - UE project using either
  69. - Vulkan
  70. - DX11
  71. - DX12
  72.  
  73. ## Diagnosing DLSS Issues in the Editor
  74.  
  75. The DLSS plugin shows various common reasons why DLSS might not be working at the top of the screen (in non-Shipping build configurations). This message can also be turned off in the DLSS plugin settings, as discussed in the "[DLSS plugin settings](#dlss-plugin-settings)" section in this document.
  76.  
  77. ![DLSS Editor Developer messages](Images/DLSSDeveloperMessages.png)
  78.  
  79. Additionally, the DLSS plugin modules write various information into the following UE log categories:
  80.  
  81. - LogDLSS
  82. - LogDLSSEditor
  83. - LogDLSSBlueprint
  84. - LogDLSSNGXRHI
  85. - LogDLSSNGXD3D11RHI
  86. - LogDLSSNGXD3D12RHI
  87. - LogDLSSNGXVulkanRHIPreInit
  88. - LogDLSSNGXVulkanRHI
  89. - LogDLSSNGX
  90.  
  91. Those can be accessed in the Editor under `Window -> Output Log`
  92.  
  93. ![DLSS Editor Output log menu](Images/DLSSOutputLogMenu.png)
  94.  
  95. The Message log then can be filtered to show only the DLSS related messages to get more information on why DLSS might not be functioning as expected, as shown in these examples.
  96.  
  97. ![DLSS Editor Output log disabled](Images/DLSSOutputLogNotWorking.png)
  98.  
  99. ![DLSS Editor Output log driver out of date](Images/DLSSOutputLogNotWorkingDriverOutOfDate.png)
  100.  
  101. ## Incompatibilities with API Capture Tools such as RenderDoc
  102.  
  103. The Editor will show a warning at startup if DLSS incompatible API capture tools (such as RenderDoc) or plugins are used. To enable DLSS, please use an API capture tool such as [NVIDIA NSIGHT Graphics](https://developer.nvidia.com/nsight-graphics), which support the NGX APIs required by DLSS.
  104.  
  105. ![DLSS Editor incompatible tools and plugins](Images/DLSSIncompatibleCaptureToolsPlugins.png)
  106.  
  107. ## Incompatibilities with Depth of Field
  108.  
  109. As DLSS workload occurs in the same spot as TAAU in the pipeline, visual differences in DoF are expected.
  110. To minimize the differences, it is recommended to use DLSS in 'Quality' or 'Ultra Quality' modes.
  111. It is possible to tweak the DoF settings in the camera actor to compensate for the differences.
  112. Please keep in mind this is content dependent. Thus for some scenes the differences can be minimal and avoided while in other cases it might be more challenging.
  113.  
  114. ## Verify Engine side plugin hooks
  115.  
  116. The following cvars should be set to those values by default:
  117.  
  118. - r.TemporalAA.Upscaler 1
  119. - r.Reflections.Denoiser 2
  120.  
  121. ## Enabling NGX DLSS Logging on End User machines
  122.  
  123. The DLSS plugin also pipes the NGX DLSS logs into the UE logging system into the `LogDLSSNGX` log category. It is enabled by default and can be tweaked with the `r.NGX.LogLevel` console variable, or set with the -NGXLogLevel=X command line option.
  124.  
  125. This requires an NVIDIA GeForce **driver version 461.36** or later.
  126.  
  127. ## Enabling NGX DLSS Logging during Development
  128.  
  129. If r.NGX.EnableOtherLoggingSinks is set then additional NGX logging of the NVIDIA NGX software stack to files can be used as well, as discussed in the "NGX logging" chapter of the [DLSS Programming Guide](DLSS_Programming_Guide_Release.pdf) for details. The -NGXLogFileEnable and -NGXLogFileDisable command line options can also override the default setting.
  130. The DLSS SDK provides registry keys which can be set with the following .reg files which can be found in the plugin folder under `\DLSS\Source\ThirdParty\NGX\Utils\`:
  131.  
  132. - `ngx_log_on.reg`
  133. - `ngx_log_off.reg`
  134. - `ngx_log_verbose.reg`
  135.  
  136. The DLSS plugin will write those into subfolder under `$(ProjectDir)\Saved\Logs\` with a `NGX_$(TimeStamp)_$(GUID)` pattern
  137.  
  138. - `nvngx.log`
  139. - `nvngx_dlss_2_1_34.log`
  140. - `nvsdk_ngx.log`
  141.  
  142. ## DLSS On-Screen Indicator
  143.  
  144. The DLSS SDK provides registry keys which can be set with the following .reg files which can be found in the plugin folder under `\DLSS\Source\ThirdParty\NGX\Utils\`:
  145.  
  146. - `ngx_driver_onscreenindicator.reg`
  147. - `ngx_driver_off_screenindicator.reg`
  148.  
  149. With the first registry key set, DLSS will display an indicator on-screen when it is enabled, enabling easier troubleshooting. The second registry key can be used to disable this indicator again.
  150.  
  151. Please see the [DLSS Programming Guide](DLSS_Programming_Guide_Release.pdf) for further details.
  152.  
  153. # <a name="command-line-options-and-console-variables-and-commands">Command Line Options And Console Variables and Commands</a>
  154.  
  155. ## Enabling DLSS (Engine Side)
  156.  
  157. The DLSS plugin uses various engine side hooks, which can be configured by the following cvars. Their default values
  158.  
  159. - r.TemporalAA.Upscaler (1, default)
  160. - Enable a custom TAAU upscaling plugin, such as the DLSS plugin
  161. - r.Reflections.Denoiser (2, default)
  162. - Enable a custom denoising plugin. The DLSS plugin makes use of this to improve image quality for raytraced reflections by adding additionial TAA passes
  163.  
  164. Additionally, when using DLSS-RR it is strongly recommended to disable built-in denoising for Lumen reflections, using the setting `r.Lumen.Reflections.BilateralFilter=0`. In engine versions 5.2 and 5.3, changing this setting at runtime via console or blueprints can lead to engine runtime assertions if the resolution later changes. It should be set only by changing a config file such as DefaultEngine.ini. So if you wish to re-enable r.Lumen.Reflections.BilateralFilter when DLSS-RR is disabled, it would require a config setting change and engine restart.
  165.  
  166. ## Enabling Motion vectors for DLSS
  167.  
  168. DLSS requires correct motion vectors to function properly. The following console variable can be used to render motion vectors for all objects, and not just the ones with dynamic geometry. This can be useful if it's infeasible to e.g. change all meshes to stationary or dynamic.
  169.  
  170. - r.Velocity.ForceOutput (0, default)
  171. - Force the base pass to compute motion vector, regardless of FPrimitiveUniformShaderParameters.
  172. - 0: Disabled
  173. - 1: Enabled
  174.  
  175. ## Enabling DLSS-SR/DLAA (Plugin Side)
  176.  
  177. - r.NGX.Enable (1, default) can also be overridden on the command line with **-ngxenable** and **-ngxdisable**
  178. - Whether the NGX library should be loaded. This allow to have the DLSS plugin enabled but avoiding potential incompatibilities by skipping the driver side NGX parts of DLSS.
  179. - r.NGX.DLSS.Enable (1, default)
  180. - Enable/Disable DLSS-SR/DLAA.
  181.  
  182. There are two alternatives for presenting DLSS in a UI, either listing all DLSS modes explictly or offering DLSS Off/Auto mode. For explicit DLSS modes, list all supported DLSS modes in the UI. Find the optimal screen percentage for the selected DLSS mode with `GetDLSSModeInformation`, set `r.ScreenPercentage` using that value, and call `EnableDLSS`. For DLSS auto mode, find the optimal screen percentage for the DLSS auto mode with `GetDLSSModeInformation`, if the screen percentage is not 0 then set `r.ScreenPercentage` using that value and call `EnableDLSS`.
  183.  
  184. The plugin includes two blueprint macros in the DLSSMacros asset for enabling DLSS and DLAA, one for explicit DLSS modes and one for DLSS auto mode. You can use a macro directly or copy it into your project to use as a starting point for your own work. You may need to enable "Show Engine Content" and "Show Plugin Content" in the content browser settings for the macros to be visible.
  185.  
  186. **Blueprint** functions:
  187.  
  188. - `Enable DLSS-SR`, `Is DLSS-SR Enabled`
  189. - `Is DLSS-SR Supported`, `Query DLSS-SR Support`, `Get DLSS-SR Minimum Driver Version`, `Get Default DLSS Mode`
  190. - `Is DLSS-SR Mode Supported`, `Get Supported DLSS-SR Modes`,`Get DLSS-SR Mode Information`, `Get DLSS-SR Screen Percentage Range`
  191.  
  192. ## Enabling DLSS-RR (Plugin Side)
  193.  
  194. - r.NGX.DLSS.DenoiserMode (0, default)
  195. - Configures how DLSS denoises
  196. - 0: off, no denoising (default)
  197. - 1: DLSS-RR enabled
  198. - r.NGX.DLSS.BuiltInDenoiserOverride (-1, default)
  199. - Change what happens to the built-in denoisers
  200. - -1: automatic, depending on r.NGX.DLSS.DenoiserMode (default)
  201. - 0: skip all built-in denoising
  202. - 1: use built-in denoising
  203.  
  204. By default, when DLSS-RR is enabled it will override all built-in denoising.
  205.  
  206. **Blueprint** functions:
  207.  
  208. - `Enable DLSS-RR`, `Is DLSS-RR Enabled`
  209. - `Is DLSS-RR Supported`, `Query DLSS-RR Support`, `Get DLSS-RR Minimum Driver Version`
  210.  
  211. *Note that DLSS-RR support is coming in a future plugin release. In this release, DLSS-RR will be reported as unsupported.*
  212.  
  213. ## DLSS Runtime Image Quality Tweaks
  214.  
  215. - r.NGX.DLSS.DilateMotionVectors (1, default)
  216. - 0: pass low resolution motion vectors into DLSS
  217. - 1: pass dilated high resolution motion vectors into DLSS. This can help with improving image quality of thin details.
  218. - note: motion vector dilation unsupported with DLSS-RR, cvar has no effect when DLSS-RR is enabled
  219.  
  220. - r.NGX.DLSS.Reflections.TemporalAA (1, default)
  221. - Apply a temporal AA pass on the denoised reflections
  222.  
  223. - r.NGX.DLSS.WaterReflections.TemporalAA (1, default)
  224. - Apply a temporal AA pass on the denoised water reflections
  225.  
  226. - r.NGX.DLSS.EnableAutoExposure
  227. - 0: Use the engine-computed exposure value for input images to DLSS
  228. - 1: Enable DLSS internal auto-exposure instead of the application provided one - enabling this can alleviate effects such as ghosting in darker scenes (default)
  229.  
  230. - r.NGX.DLSS.PreferNISSharpen (2, default)
  231. - Prefer sharpening with an extra NIS plugin sharpening pass instead of DLSS sharpening if the NIS plugin is also enabled for the project.
  232. - Requires the NIS plugin to be enabled, DLSS sharpening will be used otherwise.
  233. - 0: Softening/sharpening with the DLSS pass.
  234. - 1: Sharpen with the NIS plugin. Softening is not supported. Requires the NIS plugin to be enabled.
  235. - 2: Sharpen with the NIS plugin. Softening (i.e. negative sharpness) with the DLSS plugin. Requires the NIS plugin to be enabled.
  236. - **Note** This cvar is only evaluated when using the deprecated `SetDLSSSharpness` Blueprint function, from either C++ or a Blueprint event graph!
  237. - **Note** DLSS sharpening is deprecated, future plugin versions will remove DLSS sharpening. Use the NIS plugin for sharpening instead
  238.  
  239. ## DLSS Binaries
  240.  
  241. - r.NGX.BinarySearchOrder (0, default)
  242. - 0: automatic
  243. - use custom binaries from project and launch folder $(ProjectDir)/Binaries/ThirdParty/NVIDIA/NGX/$(Platform) if present
  244. - fallback to generic binaries from plugin folder
  245. - 1: force generic binaries from plugin folder, fail if not found
  246. - 2: force custom binaries from project or launch folder, fail if not found
  247. - 3: force generic development binaries from plugin folder, fail if not found. This is only supported in non-shipping build configurations
  248.  
  249. ## DLSS memory usage
  250.  
  251. - `stat DLSS`
  252. - shows how much GPU memory DLSS uses and how many DLSS features, i.e. instances of DLSS are allocated.
  253. - In steady state there should be 1 DLSS feature allocated per view. This value can increase temporarily, typically after changing the DLSS quality mode or resizing the window. This can be configured with the `r.NGX.FramesUntilFeatureDestruction` console variable
  254.  
  255. ## DLSS presets
  256.  
  257. The DLSS plugin offers render presets that allow tweaking different aspects of DLSS-SR upscaling. Usually there will be no need to change from the default presets. The DLSS presets are named A – G and are described in more detail in the [DLSS Programming Guide](DLSS_Programming_Guide_Release.pdf).
  258.  
  259. A particular preset can be forced separately for DLAA and for each DLSS quality mode in the [DLSS plugin settings](#dlss-plugin-settings) (Edit -> Project Settings -> NVIDIA DLSS -> General Settings -> Advanced). Additionally, the DLSS preset can be globally overridden by setting the cvar `r.NGX.DLSS.Preset` to a value from 0 to 7 (0=project setting, 1=A, 2=B, 3=C, 4=D, 5=E, 6=F, 7=G).
  260.  
  261. DLSS presets are subject to change with new versions of DLSS and via over the air (OTA) updates. To opt out of OTA updates, unselect the "Allow OTA Update" option in the [DLSS plugin settings](#dlss-plugin-settings) (Edit -> Project Settings -> NVIDIA DLSS -> General Settings). OTA updates can also be overridden on the command line with **-ngxdisableota** and **-ngxenableota**. The interaction of OTA updates with DLSS presets is described in more detail in the [DLSS Programming Guide](DLSS_Programming_Guide_Release.pdf).
  262.  
  263. ## NGX Project ID
  264.  
  265. The DLSS plugin by default uses the project identifier to initialize NGX and DLSS. On rare occasion, NVIDIA might provide a special NVIDIA NGX application ID. The following console variable determines which one is used.
  266.  
  267. r.NGX.ProjectIdentifier (0, default)
  268.  
  269. - 0: automatic:
  270. - use NVIDIA NGX Application ID if non-zero, otherwise use UE Project ID
  271. - 1: force UE Project ID
  272. - 2: force NVIDIA NGX Application ID (set via the Project Settings -> NVIDIA DLSS plugin)
  273.  
  274. Please refer to the "Distributing DLSS" section for further details.
  275.  
  276. ## Multi GPU Support (Experimental)
  277.  
  278. The DLSS plugin supports multiple GPUs in certain circumstances, as shown in the following table.
  279. There AFR stands for Alternate-Frame-Rendering, i.e. SLI or CrossFire, and SFR stands for Split-Frame-Rendering.
  280.  
  281. | RHI | AFR | SFR|
  282. | --- | --- | --- |
  283. | D3D12RHI | no | no|
  284. | D3D11RHI| yes| no|
  285. | VulkanRHI| no | no|
  286.  
  287. Notes:
  288.  
  289. - D3D12RHI
  290. - AFR is not supported
  291. - Primarily due to higher level renderer code not maintaining TAA (and thus DLSS) history across non-consecutive frames on the same GPU
  292. - SFR is not yet supported in 5.1 engines
  293.  
  294. - D3D11RHI
  295. - AFR is supported via driver based, automatic SLI support
  296.  
  297. - VulkanRHI
  298. - The VulkanRHI (as of UE 4.27) does not implement explicit MGPU, and thus neither AFR nor SFR are available
  299.  
  300. The following console variables can be used to adjust how DLSS interacts with the GPU nodes
  301.  
  302. - r.NGX.DLSS.FeatureCreationNode (-1, default)
  303. - Determines which GPU the DLSS feature is getting created on
  304. - -1: Create on the GPU the command list is getting executed on
  305. - 0: Create on GPU node 0
  306. - 1: Create on GPU node 1
  307.  
  308. - r.NGX.DLSS.FeatureVisibilityMask (-1, default)
  309. - Determines which GPU the DLSS feature is visible to
  310. - -1: Visible to the GPU the command list is getting executed on
  311. - 1: visible to GPU node 0
  312. - 2: visible to GPU node 1
  313. - 3: visible to GPU node 0 and GPU node 1
  314.  
  315. ## Miscellaneous
  316.  
  317. - r.NGX.DLSS.AutomationTesting (0, default)
  318. - Whether the NGX library should be loaded when GIsAutomationTesting is true.(default is false)
  319. - Must be set to true before startup. This can be enabled for cases where running automation testing with DLSS is desired
  320. - r.NGX.Automation.Enable (0, default)
  321. - Enable automation for NGX DLSS image quality and performance evaluation.
  322. - r.NGX.Automation.ViewIndex (0, default)
  323. - Select which view to use with NGX DLSS image quality and performance automation.
  324. - r.NGX.Automation.NonGameViews (0,default)
  325. - Enable non-game views for NGX DLSS image quality and performance automation.
  326. - r.NGX.FramesUntilFeatureDestruction (3, default)
  327. - Number of frames until an unused NGX feature gets destroyed
  328. - r.NGX.DLSS.MinimumWindowsBuildVersion (16299, default for v1709)
  329. - Sets the minimum Windows 10 build version required to enable DLSS
  330. - r.NGX.LogLevel (1, default)
  331. - Determines the minimal amount of logging the NGX implementation. Please refer to the DLSS plugin documentation on other ways to change the logging level.
  332. - 0: off
  333. - 1: on
  334. - 2: verbose
  335. - r.NGX.EnableOtherLoggingSinks (0, default)
  336. - Determines whether the NGX implementation will turn on additional log sinks LogDLSSNGXRHI
  337. - 0: off
  338. - 1: on
  339. - r.NGX.RenameNGXLogSeverities (1, default)
  340. - Renames 'error' and 'warning' in messages returned by the NGX log callback to 'e_rror' and 'w_arning' before passing them to the UE log system
  341. - 0: off
  342. - 1: on, for select messages during initalization
  343. - 2: on, for all messages
  344. - r.NGX.DLSS.ReleaseMemoryOnDelete (1, default)
  345. - Enable/disable releasing DLSS related memory on the NGX side when DLSS features get released
  346.  
  347. # DLSS and the NIS NVIDIA Image Scaling plugin
  348.  
  349. The *DLSS* plugin and NVIDIA Image Scaling (*NIS*) plugins can be enabled together for the same project. Please see the `RTX UI Developer Guidelines` document for suggested UI implementations.
  350.  
  351. It is recommend to use the NIS plugin for sharpening in place of the deprecated DLSS sharpening feature.
  352.  
  353. # DLSS/DLAA in the Editor
  354.  
  355. ## Enabling DLSS/DLAA for a project
  356.  
  357. ![DLSS Plugin](Images/DLSSPlugin.png)
  358.  
  359. ## Enabling DLSS/DLAA in Level Editor Viewports
  360.  
  361. First enable the "Enable DLSS/DLAA to be turned on in Editor viewports" checkbox in the project plugin settings `Project Settings -> Plugins -> NVIDIA DLSS` or the local override `Project Settings -> Plugins -> NVIDIA DLSS (Local)`. Note that DLSS/DLAA is off by default in editor viewport windows.
  362.  
  363. With DLSS/DLAA enabled, change the Screen Percentage in an editor viewport window to control the upscaling amount. With a screen percentage of 100, DLAA will be in effect. Sliding the screen percentage between 50% and 99% will enable DLSS upscaling.
  364.  
  365. ![DLSS Editor Viewport](Images/DLSSViewportScreenPercentage.png)
  366.  
  367. ## <a name="dlss-plugin-settings">DLSS Plugin Settings</a>
  368.  
  369. Some of the "Level Editor - Viewport" settings are split across two config files and settings pages to tailor how DLSS is interacting with the editor user experience.
  370.  
  371. For example, a cross-platform game project might find it more practical by default to only have DLSS enabled in "Play In Editor Viewports" or in "game mode" in order to maintain a consistent content authoring experience across the range of supported platforms.
  372. However projects (e.g. an architecture visualization project with notable raytracing workloads), might find it more useful to have DLSS enabled during the content authoring. Either way each user can override those settings locally:
  373.  
  374. - `Project Settings -> Plugins -> NVIDIA DLSS`
  375. - stored in DefaultEngine.ini
  376. - typically resides in source control.
  377. - settings here are shared between users
  378. - `Project Settings -> Plugins -> NVIDIA DLSS (Local)`
  379. - stored UserEngine.ini
  380. - not recommended to be checked into source control.
  381. - allow a user to override project wide settings if desired. Defaults to "use project settings"
  382.  
  383. ![DLSS plugin project settings](Images/DLSSPluginProjectSettings.png)
  384.  
  385. ![DLSS plugin local project settings](Images/DLSSPluginProjectSettingsLocal.png)
  386.  
  387. ## Editor Settings
  388.  
  389. By default, the editor overrides the screen percentage when running in PIE. This can interfere with application logic that changes the screen percentage to set a particular DLSS quality level. To allow the application to set screen percentage, go to `Edit -> Editor Preferences -> Performance` and turn off "Override game screen percentage settings with editor settings in PIE". Restart the editor after changing this setting.
  390.  
  391. ![Editor settings](Images/DLSSEditorSettings.png)
  392.  
  393. ## <a name="dlss-blueprints">DLSS Blueprints</a>
  394.  
  395. The UDLSSLibrary blueprint library provides functionality to query whether DLSS and which modes are supported. It also provides convenient functions to enable the underlying DLSS console variables. The tooltips of each function provide additional information.
  396.  
  397. Using the UDLSSLibrary via blueprint or C++ (by including the DLSSBlueprint module in a game project) is recommended over setting the console variables directly. This will make sure that any future updates will be picked up by simply updating the DLSS plugin, without having to update the game logic.
  398.  
  399. ![DLSS Blueprint library](Images/DLSSBlueprintLibrary.png)
  400.  
  401. ## DLSS Movie Render Queue Support
  402.  
  403. DLSS is supported when rendering movies with the Movie Render Queue plugin.
  404.  
  405. 0. Enable the *Movie Render Queue* and *DLSS* plugins in the Editor
  406. 1. Enable the *Movie Render Queue DLSS Support* plugin in the Editor, then restart the editor
  407. 2. In the configuration, add the `Settings -> DLSS` page
  408. 3. In the DLSS settings page, change the desired DLSS quality mode
  409. 1. Note: Unsupported DLSS modes will show a warning at the bottom of the window
  410. 4. Optional: The `Settings -> Output -> File Name Format` page supports a `{dlss_quality}` format tag
  411.  
  412. **Note:** Only the *Deferred Rendering* render pass is supported with DLSS, all other passes use the built-in TAA
  413.  
  414. ![DLSS Movie Scene Support Plugin](Images/DLSSMoviePipelineSupportPlugin.png)
  415.  
  416. ![DLSS Movie Scene Support DLSS Setting](Images/DLSSMoviePipelineSupportDLSSetting.png)
  417.  
  418. ![DLSS Movie Scene Support DLSS Setting Options](Images/DLSSMoviePipelineSupportDLSSOptions.png)
  419.  
  420. ![DLSS Movie Scene Support DLSS Setting Options](Images/DLSSMoviePipelineSupportDLSSFormatFlags.png)
  421.  
  422. # Distributing DLSS
  423.  
  424. The DLSS plugin ships with a ready-to-use production DLSS binary (without watermarks) and uses the project identifier to initialize NGX and DLSS. This is the common case for distribution to end users and does not require further actions from either your or NVIDIA's side.
  425. On rare occasion NVIDIA however might provide:
  426.  
  427. 1. a custom project specific DLSS binary
  428. 2. an NVIDIA application ID
  429.  
  430. In that case those can be configured in the advanced plugin settings. Additionally please also ensure that the r.NGX.ProjectIdentifier console variable is set to either 0 (the default) or 2.
  431. The project plugin settings can be used to configure those (please see above).
  432.  
  433. 1. The custom, project specific DLSS binary `nvngx_dlss.dll` should be put into the project under `$(ProjectDir)/Binaries/ThirdParty/NVIDIA/NGX/$(Platform)`
  434. 2. Setting the NVIDIA NGX application ID for the project.
  435.  
  436. ![DLSS Plugin Project Settings](Images/DLSSPluginProjectSettings.png)
  437.  
  438. Please refer to "Chapter 4 Distributing DLSS in a Game" in the the [DLSS Programming Guide](DLSS_Programming_Guide_Release.pdf) for details.
  439.  
  440. # Upgrading from DLSS plugin versions for earlier engines
  441.  
  442. In general, it is strongly recommended to use the DLSS on-screen indicator when upgrading from engine versions before 5.1 to verify that you are still getting DLSS and DLAA enabled properly in your application.
  443.  
  444. ## Screen percentage
  445.  
  446. Before Unreal Engine 5.1, the DLSS plugin controlled upscaling screen percentage directly, overriding anything set through the `r.ScreenPercentage` cvar or other methods. In Blueprints or in code, the application would request a particular DLSS quality mode from the plugin, and the plugin would internally set the quality mode and the appropriate screen percentage.
  447.  
  448. Starting with Unreal Engine 5.1, plugins do not override the upscaling screen percentage. So now to get a particular DLSS quality mode, the application must set the screen percentage corresponding to the optimal value for the desired DLSS quality mode. If DLSS is enabled, the plugin will internally set the best quality mode for the current screen percentage. GetDLSSModeInformation can be used from blueprints or from C++ to find the optimal screen percentage for a given DLSS quality mode. For DLAA, set a screen percentage of 100%.
  449.  
  450. The old SetDLSSMode and EnableDLAA blueprint functions have been deprecated and should be replaced with EnableDLSS, and then the appropriate screen percentage can be set by executing the `r.ScreenPercentage` console command from blueprints or code.
  451.  
  452. Before updating, you will see deprecation warnings for the old blueprint functions.
  453.  
  454. ![DLSS deprecation warning](Images/DLSSUpgradeBefore.png)
  455.  
  456. To offer the same DLSS quality mode options as before, check the optimal upscaling screen percentage for a quality mode and use the "r.ScreenPercentage" console command to set it.
  457.  
  458. ![DLSS setting after upgrade](Images/DLSSUpgradeDLSSSetting.png)
  459.  
  460. DLAA is enabled by setting screen percentage to 100.
  461.  
  462. ![DLAA setting after upgrade](Images/DLSSUpgradeDLSSSettingWithDLAA.png)
  463.  
  464. If you want your application to offer DLSS Off/Auto options instead of selecting individual DLSS quality modes, you can supply the screen resolution along with the fake "Auto" quality mode to GetDLSSModeInformation and a recommended screen percentage will be provided.
  465.  
  466. ![DLSS auto setting after upgrade](Images/DLSSUpgradeAuto.png)
  467.  
  468. If your application changed `r.ScreenPercentage` before upgrading to Unreal Engine 5.1 or later, you may find that DLSS/DLAA behaves differently after upgrading. This is because before engine version 5.1, the DLSS plugin was able to override the screen percentage value when DLSS or DLAA were enabled. When using the DLSS on-screen indicator, if you see that the upscale resolution doesn't change when changing DLSS modes, check for any blueprints or code that may be setting `r.ScreenPercentage` directly.
  469.  
  470. ## DLSS sharpening
  471.  
  472. The DLSS sharpening feature has been deprecated. It's recommended to use the NVIDIA Image Scaling (NIS) plugin for sharpening instead.
  473.  
  474. # Performance benefits of DLSS-SR
  475.  
  476. Unreal Engine 5 scales the input resolution of the rendered scene automatically according to the current output resolution, ranging from 50 to 100%. Since all upscalers use the same automatic input resolution, performance should be similar across the available options. DLSS-SR has the advantage of delivering the best overall image quality thanks to the AI and deep learning techniques used to upscale and enhance the output. As a result, DLSS-SR has the ability to support resolutions below 50% with a 33% input resolution "Ultra Performance" mode to deliver significant performance gains while still preserving image quality.
  477.  
  478. # DLSS API and UI Documentation
  479.  
  480. The [DLSS Programming Guide](DLSS_Programming_Guide_Release.pdf) provides details about the NVIDIA NGX APIs which are used by the plugin to implement DLSS.
  481.  
  482. The [RTX UI Developer Guidelines](RTX%20UI%20Developer%20Guidelines.pdf) ([Chinese](RTX%20UI%20Developer%20Guidelines%20Chinese%20Version.pdf)) provides details about recommended game settings and UI for DLSS.
  483.  
  484. The NVIDIA Developer Blog [Tips: Getting the Most out of the DLSS Unreal Engine 4 Plugin](https://developer.nvidia.com/blog/tips-getting-the-most-out-of-the-dlss-unreal-engine-4-plugin/) provides best practices along with other tips and tricks to use NVIDIA DLSS in Unreal Engine games and applications.
  485.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement