Nico de Poel
b289f025c1
Replaced manually copied native PSSR plugin with an auto-building package
1 year ago
Nico de Poel
93ba131087
Renamed exported PSSR functions
1 year ago
Nico de Poel
5845b0f7ca
Refactored MFSR dispatch into its own function, to be consistent with the other rendering events and to allow direct calls from managed code if desired.
1 year ago
Nico de Poel
a4a422b8dc
Fixed a subtle bug where pointers to two structs that were out of scope were being passed to the MFSR initialization. This only went wrong when the native plugin was compiled with optimizations enabled.
1 year ago
Nico de Poel
da270aef75
Ported back a few fixes from Isonzo:
- Detect if the native plugin is missing, in which case the upscaler won't be initialized.
- Use the transparency & composition mask as input for the reactive mask initially.
1 year ago
Nico de Poel
4406d9d697
Destroy context by directly calling into the library instead of using a plugin event. Seems perfectly stable in testing and fixes an issue where occasionally the wrong context index would come through in native code.
1 year ago
Nico de Poel
3931c67a7e
Fixed a memory leak on repeated destroy/create, as it turns out MFSR doesn't take ownership of the memory you allocate for it. You have to keep track of this and release it yourself.
1 year ago
Nico de Poel
0596b31ab5
Eliminated the extra output color texture copy, which turned out to be not necessary. Both the CAS sharpen pass and Blit will take care of the necessary conversion.
1 year ago
Nico de Poel
16774bc66f
Removed obsolete and unused code files from the plugin
1 year ago
Nico de Poel
e856979480
Cleanup and comments
1 year ago
Nico de Poel
efd7240f94
Rotate between PSSR contexts to further reduce risk of race conditions between destroy & create
1 year ago
Nico de Poel
f87457803c
Reworked plugin structure so that up to four MFSR context can be created and used, with Unity being able to select which context to use.
1 year ago
Nico de Poel
470c178e4f
Moved command buffer creation/destruction to context create/destroy, so that the command buffer is directly associated with the MFSR context.
1 year ago
Nico de Poel
8ac6e5f4ec
Use CAS with precise math
1 year ago
Nico de Poel
b3da3e5cee
Added optional CAS sharpening step with halved sharpness range. Fixed the CAS shader to keep the output in HDR.
1 year ago
Nico de Poel
49a55498c4
Simplified prepare inputs shader by removing the conditionals and the entire constant buffer
1 year ago
Nico de Poel
0bbf0de336
Initialize PSSR plugin once in class constructor and don't bother cleaning up, since we can reuse the same shared resources for the duration of the application's lifetime.
1 year ago
Nico de Poel
9a80b0f1c0
Some cleanup and reorganization
1 year ago
Nico de Poel
7f48d82c81
- Provide copies of depth and MVs ourselves, which ties in nicely with the mandatory Prepare Input copying.
- Made auto-keeping of copies internally by MFSR optional
- Added optional auto-reactive mask generation pass
1 year ago
Nico de Poel
010be580b9
Simplified prepare inputs shader and added a comment about the depth RT
1 year ago
Nico de Poel
dc12bc4a45
Allow option flags to be set from Unity and set motion vector gamma to 1 by default
1 year ago
Nico de Poel
2ecc2d54b9
- Use non-jittered camera projection matrix
- Double checked jitter offset values
- Use prepared (i.e. copied) motion vector texture
1 year ago
Nico de Poel
67d90c9b14
Added PSSR plugin source
1 year ago
Nico de Poel
8d973cf234
First working proof-of-concept implementation of PSSR
1 year ago
Nico de Poel
5646e0a325
Added PoC SGSR2 upscaler
1 year ago
Nico de Poel
295a856287
Additional debug output
1 year ago
Nico de Poel
3ab97172e6
Upgraded project to Unity 2022.3.47f1, enabled Trinity support and set up some initial resolution values
1 year ago
Nico de Poel
ceb8421e79
Updated debug tools to allow A/B comparisons between upscalers
1 year ago
Nico de Poel
6ad499c57d
Added CAS sharpening shader
1 year ago
Nico de Poel
8db82e664c
Reworked upscaling integration to allow for multiple upscaler algorithms that can be switched on the fly.
1 year ago
Nico de Poel
31eb875b79
Fixed an issue that would cause the wrong depth buffer to be passed to FSR when using forward rendering on newer Unity versions.
2 years ago
Nico de Poel
79298e140b
Updated namespaces now that FSR3 is in a separate sub-namespace.
2 years ago
Nico de Poel
911ae9bb29
Removed .19f1 requirement from PPV2 package. Any Unity 2020.1 and up should be supported.
2 years ago
Nico de Poel
582cd80713
Took FSR3 code and shaders out of the PPV2 package and replaced it with an FSR3 package reference
2 years ago
Nico de Poel
d1808d542e
Updated SuperResolution effect implementation to be compatible with FSR 3.1
2 years ago
Nico de Poel
63d46a6c8e
Imported FSR 3.1 implementation
2 years ago
Nico de Poel
7b37a0fba1
Correctly destroy resources when not in play mode
2 years ago
Nico de Poel
c66ab6136d
Applied correct macros to input and output texture definitions for HDRP support
2 years ago
Nico de Poel
a6b7b7235e
Prevent Unity from treating shader include headers as native plugin code
2 years ago
Nico de Poel
004cbc9468
Fixed opaque-only copy buffer not keeping dynamic resolution scaling in mind.
2 years ago
Nico de Poel
d1f207d691
Removed empty parantheses from macro definition, as it breaks the Unity 2020.1 shader compiler.
2 years ago
Nico de Poel
415154ff54
- Separated FSR3 shader aggregate from the scriptable object, so that they can be embedded directly inside PostProcessResources
- No longer need to send callbacks to the FSR3 Context.
2 years ago
Nico de Poel
6b590b64af
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.
2 years ago
Nico de Poel
b7b3842b95
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.
2 years ago
Nico de Poel
6fc389f137
Fixed a few comments that still referred to FSR2
2 years ago
Nico de Poel
c71e487b15
Updated SuperResolution shaders and code to FSR3
2 years ago
Nico de Poel
7384b4486a
Fixed aspect ratio for dual-viewport setups
2 years ago
Nico de Poel
da866d9e25
Merge branch 'master' into fsr2
2 years ago
Nico de Poel
f399aaee4f
Upgraded to PPV2 version 3.4.0 with WebGPU support and several bug fixes
2 years ago
Nico de Poel
ad3966f3f6
Revert "Removed unnecessary aspect ratio lines that broke screen aspect when using non-standard viewports."
This reverts commit 79f2ab14bf .
2 years ago