Commit Graph

  • 25157d11aa Moved FSR3 classes into their own sub-namespace. This is more future-proof with an eye on porting over more FidelityFX technologies. fsr3.1 Nico de Poel 2024-07-20 18:25:56 +0200
  • 9e9a796c91 Small simplification Nico de Poel 2024-07-20 01:19:55 +0200
  • 4ad9853a05 - Moved ResourceView into its own source file. - Using texture arrays is now a boolean flag that can be set on dispatch, removing the need for HDRP-specific checks inside the FSR3 code and shaders. - Debug view shader is no longer conditionally included. - Reduced the number of multi-compile variants by removing unused keywords for each shader. - Optimized temporary RT use; two resources can reuse the same generic intermediate temp RT. - Reorganized some of the shader code to work nicer with the rest of the FidelityFX SDK sources. Nico de Poel 2024-07-19 16:55:32 +0200
  • c15bd345e6 Fixed another incorrect size Nico de Poel 2024-07-10 01:10:49 +0200
  • 428aaa20a7 Implemented macros for SRV/UAV resource definitions that need to support texture arrays in HDRP Nico de Poel 2024-07-10 00:16:00 +0200
  • 49ad18ce57 Updated the README because I'm vain like that Nico de Poel 2024-07-09 22:53:38 +0200
  • e8f69d6030 Small bits Nico de Poel 2024-07-09 22:47:01 +0200
  • 3a65d37c41 Implemented debug view pass Nico de Poel 2024-07-09 22:42:58 +0200
  • 60336253b7 Fixed a couple of incorrect sizes Nico de Poel 2024-07-09 22:25:23 +0200
  • 386df536e9 Once again disabled native plugin settings for all header include files Nico de Poel 2024-07-09 22:15:05 +0200
  • befab81785 Added all multi_compile variants to all (new) shader passes. We'll have to figure out later which permutations are actually necessary per shader. Nico de Poel 2024-07-09 22:13:17 +0200
  • 61e03ec329 Couple of minor fixes and comment changes Nico de Poel 2024-07-09 22:12:05 +0200
  • 78f9142738 Fixed a few small resource binding errors Nico de Poel 2024-07-09 21:49:21 +0200
  • d609eae96f Added profiling samplers to make debugging a bit easier Nico de Poel 2024-07-09 21:42:40 +0200
  • 1bcba64b26 Fixed crash in reactive mask pass due to unused CB binding Nico de Poel 2024-07-09 21:31:53 +0200
  • d6bb123157 Removed unused resource definitions Nico de Poel 2024-07-09 21:21:49 +0200
  • 3908ee767b Modified passes with updated SRV and UAV bindings Nico de Poel 2024-07-09 21:17:07 +0200
  • 9bc90e4853 Updated dispatching function with new passes and modified buffer clears Nico de Poel 2024-07-09 20:41:40 +0200
  • aca067bff0 Updated debug checks Nico de Poel 2024-07-09 20:24:54 +0200
  • 4a18c3a6c4 Defined the new passes in code and renamed some of the old ones Nico de Poel 2024-07-09 20:21:49 +0200
  • 6c024407cb Defined all of the resources needed for FSR 3.1, left the old stuff intact for now so it still compiles. Nico de Poel 2024-07-09 20:12:36 +0200
  • 3cd8b41224 Updated upscaler constants definition and implemented modifications to the constants setup function. Nico de Poel 2024-07-09 19:13:28 +0200
  • 0e481544bf Updated shader assets names and references for the new collection of passes. Nico de Poel 2024-07-09 18:51:59 +0200
  • e61198fe01 Readded type definitions for Unity HDRP and/or PSSL support. Nico de Poel 2024-07-09 18:34:37 +0200
  • 16af3cada0 Fixed compiler warnings in shading change pyramid shader Nico de Poel 2024-07-09 18:08:46 +0200
  • d32afe5f90 Added shading change and shading change pyramid passes. All FSR 3.1 shader passes are now compiling. Nico de Poel 2024-07-09 18:04:10 +0200
  • 9d99cb157a Fixes for TCR auto-gen pass Nico de Poel 2024-07-09 17:57:55 +0200
  • 83304de177 Removed unnecessary GLSL file Nico de Poel 2024-07-09 17:54:46 +0200
  • c6912f3ffa Fixes for prepare inputs, prepare reactivity and luma instability passes. Nico de Poel 2024-07-09 17:48:00 +0200
  • a5a2c8784d Fixes for luminance pyramid pass and gen reactive pass Nico de Poel 2024-07-09 17:20:40 +0200
  • 0ab4f99e13 Fixes for accumulate pass Nico de Poel 2024-07-09 17:16:52 +0200
  • c7c640565b First import of new FSR 3.1 shader sources. Does not compile yet. Nico de Poel 2024-07-09 17:08:17 +0200
  • b03217eebd Initial update of dispatch parameters and enums for FSR 3.1 Nico de Poel 2024-07-09 16:47:00 +0200
  • d21b57083b Fixed potential nullref when Destroy gets called repeatedly fsr3 Nico de Poel 2024-06-12 09:55:22 +0200
  • e0cfed7f99 Prevent Unity from treating FFX shader include headers as native plugin code. Nico de Poel 2024-06-05 15:11:31 +0200
  • 8b4a7fd78f Correctly destroy resources when not in play mode Nico de Poel 2024-06-05 13:02:42 +0200
  • 72f2aa9da2 HDRP-ified input reactive and T&C masks, which is necessary to make them work inside of HDRP's current upscaling framework Nico de Poel 2024-06-05 13:01:02 +0200
  • 0de545b77e Resource management section is gone, remove it from the TOC Nico de Poel 2023-12-21 12:07:20 +0100
  • 69edeb8962 RCAS shader needs an HDRP switch as well, now that the final output image can be a texture array too. Nico de Poel 2023-12-20 17:17:49 +0100
  • 3de6d74762 Official docs are on GPUOpen site now, not Github. Nico de Poel 2023-12-19 13:10:49 +0100
  • 941c04fe63 One more updated screenshot and added a small bit about the Assets object. Nico de Poel 2023-12-19 11:32:18 +0100
  • e3d36585ef Fixed aspect ratio in image effect helper too Nico de Poel 2023-12-19 11:06:16 +0100
  • b432c73943 Updated screenshots for FSR3 Nico de Poel 2023-12-19 11:00:11 +0100
  • b8a92ef298 Added missing images for README Nico de Poel 2023-12-19 10:16:36 +0100
  • cd8bc8ddba Removed empty parantheses from macro definition, as it breaks the Unity 2020.1 shader compiler. Nico de Poel 2023-12-18 20:09:27 +0100
  • f3b68256aa Removed the section about shader loading callbacks, plus a few minor adjustments. Nico de Poel 2023-12-18 19:47:53 +0100
  • 8e879726d7 Split the FSR3 shaders aggregate class from the scriptable object part. This allows the shader references to be serialized as a single asset still, but also for them to be embedded inline inside of a different scriptable object (for PPV2) Nico de Poel 2023-12-18 17:50:23 +0100
  • 734770b75e Callbacks don't need to be passed to the FSR3 Context anymore. Nico de Poel 2023-12-18 12:58:36 +0100
  • 2d05d08f86 Added the ability to clone the shaders, in case multiple FSR3 instances with different configurations are needed. Nico de Poel 2023-12-18 12:19:25 +0100
  • fdcc85355c Try our best to ensure a shaders asset is assigned to the image effect component. Nico de Poel 2023-12-18 12:07:39 +0100
  • d3d608c95e Moved shaders from Resources to a regular Shaders folder, discouraging the use of always-included Resources for non-trivial assets. Nico de Poel 2023-12-18 10:51:36 +0100
  • bd98fdf00d Turned shaders aggregate into a scriptable object, with a default asset instance that automatically resets to look up the correct shader references. Nico de Poel 2023-12-18 10:35:23 +0100
  • 7b8bb02e93 Updated README to be more consistent in the use of the word Upscaler vs. Upscaling Nico de Poel 2023-12-17 18:35:31 +0100
  • 84e5e72ab7 Refactored loading of FSR3 compute shaders, using an aggregate object containing pre-loaded compute shaders instead of the old callbacks. This gives more control to the application about how shaders are loaded/unloaded, and it fits in much more nicely with PPV2's resources. Shaders are currently just serialized as part of the scene component, which isn't the optimal solution yet. Nico de Poel 2023-12-17 17:43:51 +0100
  • 13910c8687 Moved ResourceView out of the Fsr3Upscaler class and into the FidelityFX namespace, making usages of ResourceView a lot cleaner. ResourceView is also generic enough that it could/should be reused for any other FidelityFX effects, so this move makes sense. Nico de Poel 2023-12-16 13:38:13 +0100
  • 9fddd7e414 Updated links to refer to the documentation on the GPUOpen site. Nico de Poel 2023-12-15 17:38:16 +0100
  • dc0c60ebba Updated README to say FSR3 Upscaling/Upscaler instead of FSR2, and with new links to the AMD FidelityFX Github page on the FSR3 release branch. Nico de Poel 2023-12-15 17:26:02 +0100
  • ebb9d84171 Rename FSR2 to FSR3 Upscaler, part 3: missing bits. Nico de Poel 2023-12-15 16:45:04 +0100
  • 9854cd1279 Rename FSR2 to FSR3 Upscaler, part 2: class and file names. Nico de Poel 2023-12-15 16:37:21 +0100
  • 226884b8f5 Removed old FSR2 shader code Nico de Poel 2023-12-15 16:26:51 +0100
  • 62a924ae83 Rename FSR2 to FSR3 Upscaler, part 1: strings and comments. Nico de Poel 2023-12-15 16:22:34 +0100
  • d79b84d0ed Fixed warning in luminance pyramid pass when FP16 is enabled Nico de Poel 2023-12-15 13:33:04 +0100
  • c2f397892f Forward ported TCR autogen pass to fit in with the rest of the FSR3 shader code Nico de Poel 2023-12-15 13:03:22 +0100
  • c83c3e5805 Cleaned up compute shader initialization, as the Nvidia-specific FP16 exception for the accumulate stage doesn't seem to be required anymore. Nico de Poel 2023-12-15 12:50:26 +0100
  • f7559480ec Reinstated experimental DXC pragmas, Metal texture atomics hack, and HDRP overrides for texture array declarations and sampling. Nico de Poel 2023-12-15 12:43:14 +0100
  • 6e20557253 Ported clearing code for reconstructed depth buffer, which is new in FSR3. This replaces clearing in the Lock pass, allowing the buffer to be reused after upscaling is done. Nico de Poel 2023-12-15 11:52:18 +0100
  • 69a640c7cd Backported shader modifications, part 2: overridable texture declaration and sampling macros. Nico de Poel 2023-12-15 11:00:22 +0100
  • fd37e541b1 Backported shader modifications, part 1: PSSL support, removed GLSL extensions and added dummy field. Nico de Poel 2023-12-15 10:49:02 +0100
  • fa1704e65f First working proof of concept of FSR3 upscaling in Unity Nico de Poel 2023-12-14 19:50:26 +0100
  • d48c7a200d Added FSR3 HLSL shader code with initial batch of Unity .compute wrappers Nico de Poel 2023-12-14 18:57:58 +0100
  • 68ea8d2f14 Fixed aspect ratio for dual-viewport setups master Nico de Poel 2023-12-14 18:12:48 +0100
  • bda7eddc6f Revert "Removed unnecessary aspect ratio lines that broke screen aspect when using non-standard viewports." Nico de Poel 2023-11-27 11:58:46 +0100
  • 501f3e4f90 Removed unnecessary aspect ratio lines that broke screen aspect when using non-standard viewports. Nico de Poel 2023-10-26 23:00:41 +0200
  • c010b6aa28 Renamed Pipelines to Passes Nico de Poel 2023-09-07 13:13:32 +0200
  • 22701fdd17 Renamed RenderTargetView to ResourceView, which is a bit shorter to type and covers the essence well. Nico de Poel 2023-08-25 16:13:40 +0200
  • d9f9ef10ff Modified RenderTargetView yet again: made a distinction between an invalid (Unassigned) texture reference and a valid-but-empty (None) texture reference. Inverted IsEmpty as well to be a more generic IsValid property now. Nico de Poel 2023-08-21 13:56:38 +0200
  • d8a4bc3f61 Unity 2020.1 compatibility testing results Nico de Poel 2023-08-20 22:21:48 +0200
  • 47cba76dee Made all RenderTargetView fields non-nullable, and introduced a special Empty value for optional fields. This removes the need for a lot of HasValue checks, especially since all fields will eventually get a value anyway, making those checks rather redundant. This also makes it clearer that all SRVs will get bound with a valid input texture, even if the input is optional. Nico de Poel 2023-08-20 21:56:31 +0200
  • e8d12c201e - Reworked input/output resource management using a new RenderTargetView struct, which encompasses all relevant data required to bind textures from various sources. This eliminates the need for resource binding code outside of the core FSR2 classes, and makes the public API more strict and consistent, but also more flexible. In addition, it removes the need for the slightly awkward input/output resource debug checks. - Changed prebaked RCAS configurations into an array, as there is no need for a dynamically sized list here. Nico de Poel 2023-08-19 15:46:20 +0200
  • 7c41364109 Set constant buffer data as part of the command buffers, instead of immediately. Nico de Poel 2023-08-14 11:36:22 +0200
  • 9668b132e7 Clear initial exposure value with zero. Seems to work fine for all tested platforms, and eliminates the black screen flashes on Metal without requiring any platform-specific hacks. Nico de Poel 2023-07-07 10:50:00 +0200
  • c65cab824e Clear auto-exposure texture using zeroes on Metal. Should fix black screen flashes on accumulation reset, when auto-exposure is enabled. Nico de Poel 2023-07-06 15:09:43 +0200
  • e577240354 Reset atomic counter on any kind of reset, not just on first execution. Fixes black screen on Metal when doing a history reset. Nico de Poel 2023-07-06 10:25:02 +0200
  • a006489e3d Removed old attempts at integrating FSR2 into the PPV2 pipeline. These never went anywhere and have been left undeveloped for a long time now. Nico de Poel 2023-07-05 13:16:46 +0200
  • 8c43881c8d Added zero check to make undo mipmap bias offset an idempotent operation Nico de Poel 2023-07-05 12:57:32 +0200
  • 9911642947 Refactored undo mipmap bias callback such that the RP integration does not need to maintain any bias offset state. Added NaN/Infinity check to the standard apply mipmap bias callback implementation. Nico de Poel 2023-07-05 12:42:08 +0200
  • d0deaa46b5 Experimentation with stacked cameras; apply only viewport rect and jitter offset on first camera, perform upscaling with second camera. Sync settings between cameras. Nico de Poel 2023-07-03 13:17:17 +0200
  • bc3192fc40 Made undoing of mipmap bias a distinct separate callback, so that it can be overridden by client apps. Nico de Poel 2023-06-27 10:42:58 +0200
  • 9e53cf52f8 Skip textures that don't have mipmaps and thus don't have any use for a mipmap bias Nico de Poel 2023-06-27 10:32:50 +0200
  • 8a1572933a Disable plugin importer settings on all FSR2 header include files Nico de Poel 2023-06-27 00:19:48 +0200
  • cf04a0ea7b Renamed max render size field to be consistent with PPV2 integration Nico de Poel 2023-06-15 23:21:22 +0200
  • b3bc46fcb7 Moved management of aliasable resources to the Fsr2Resources class and gave the methods more logical names. Nico de Poel 2023-06-12 14:44:19 +0200
  • 3f17ca1fe2 Revert "Create temporary resources at actual render size, further reducing VRAM usage when dynamic resolution is in effect." Nico de Poel 2023-06-12 14:39:19 +0200
  • 45ce81610d Restored compatibility with Unity versions older than 2021.2, which didn't have the LocalKeyword struct yet. Nico de Poel 2023-06-11 17:36:37 +0200
  • 5a0edc2063 Reset dynamic buffer scale when exiting play mode Nico de Poel 2023-06-10 19:14:57 +0200
  • a2c1211d98 Create temporary resources at actual render size, further reducing VRAM usage when dynamic resolution is in effect. Nico de Poel 2023-06-10 19:11:11 +0200
  • 20801cfd6a Updated shaders to FSR 2.2.1 Nico de Poel 2023-06-10 17:08:48 +0200
  • 5236c28e7e Added support for dynamic resolution scaling using ScalableBufferManager. Nico de Poel 2023-06-08 14:21:19 +0200
  • cf316ebf4f Comment that the atomic counter shouldn't be aliasable Nico de Poel 2023-06-06 15:41:43 +0200
  • 63d6fd3203 Changed atomic counter from a temporary RT to a permanent one, and set it to 0 only on the first frame. Potential fix for auto-exposure on MacOS. mac-autoexp Nico de Poel 2023-06-06 15:30:08 +0200