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
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
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
ceb8421e79
Updated debug tools to allow A/B comparisons between upscalers
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
d1808d542e
Updated SuperResolution effect implementation to be compatible with FSR 3.1
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
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
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
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
Nico de Poel
79f2ab14bf
Removed unnecessary aspect ratio lines that broke screen aspect when using non-standard viewports.
2 years ago
Nico de Poel
8c7aeae4a7
Renamed RenderTargetView to ResourceView, which is a bit shorter to type and captures the essence well.
2 years ago
Nico de Poel
87f11b5f7c
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.
2 years ago
Nico de Poel
b4ddc41f1b
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. It also removes the need for the slightly awkward input/output resource debug checks.
2 years ago
Nico de Poel
02427c2c42
[PPV2] PPB-6 Disabled compute effects on WebGL and Android OpenGL ( #7936 )
* Disabled compute based effects not supported on WebGL and Android OpenGL
* Improved editor warning messages.
* Fix editor warning messages.
3 years ago
Nico de Poel
6221c9ea1f
Use jittered camera projection for transparent rendering, as it does affect image reconstruction for certain specific effects, e.g. line renderers.
3 years ago
Nico de Poel
afc5d4896f
[PPV2] Fix AO on OSX ( #7922 )
AO no longer requires sparse texture support
3 years ago
Nico de Poel
fe10480628
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.
3 years ago
Nico de Poel
f35b63f292
Made undoing of mipmap bias a distinct separate callback, so that it can be overridden by client apps. Skip textures that don't have mipmaps and thus don't have any use for a mipmap bias.
3 years ago
Nico de Poel
807b05f3d8
Fixed input resource size again and ffs stop stubbornly making this same mistake over and over again
3 years ago
Nico de Poel
bdca6950c4
Set the dynamic resolution flag when appropriate. It doesn't actually do anything, but it's good form to include it.
3 years ago
Nico de Poel
2bbb4f3a1f
Fixed incorrect scaled render size during FSR dispatch because of course, global variables and side-effects are bad m'kay.
At least dynamic scaling works now, so we can go from here.
3 years ago
Nico de Poel
f93e371c2c
Fixed camera viewport getting double scaled. This gets us back on track again.
3 years ago
Nico de Poel
9b15d2b84f
Reworked dynamic resolution to use ScalableBufferManager. Doesn't actually work correctly yet, but that'll be the next step.
3 years ago
Nico de Poel
4707ce8364
Implemented dynamic scaling through a custom scale factor. No ScalableBufferManager involved. Doesn't work nicely with MSVO AO, but otherwise does the job.
3 years ago
Nico de Poel
e1660542ea
Updated PPV2 code to version 3.3.1
3 years ago
Nico de Poel
91c6d58147
Comments
3 years ago
Nico de Poel
2e67acb859
Eliminated unnecessary blit to an intermediate temp RT by allowing PPV2 screen space RTs to be created with random write access. This way FSR2 can output directly to the PPV2 effects chain.
3 years ago
Nico de Poel
2323ae88d5
Refactored opaque-only color texture to be provided as a property, instead of as a function argument. This keeps the Render() method in line with all of the other effects.
3 years ago
Nico de Poel
9b140d20a3
Updated PPV2 code to version 3.3.0
3 years ago
Nico de Poel
5bca835097
Set a default motion blending value on depth-of-field when FSR is active. Reduces jittering artifacts on DoF blur.
3 years ago
Nico de Poel
0d6ba46401
Fixed input resource size to match the lower internal render resolution. At the time this code gets called, the context's width and height will have already been increased to display resolution, which are the incorrect values for this field.
3 years ago
Nico de Poel
a9bd7a284f
Additional safety checks when applying mipmap bias offset
3 years ago
Nico de Poel
d1965ee786
Callbacks factory does not need to be static and should not be static (i.e. allow for different callbacks depending on context)
3 years ago
Nico de Poel
23d26aa84b
Allow a choice for exposure value source: either auto-calculated from FSR2 or Unity, or a manual texture, or the default value.
3 years ago