Nico de Poel
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.
2 years ago
Nico de Poel
c15bd345e6
Fixed another incorrect size
2 years ago
Nico de Poel
e8f69d6030
Small bits
2 years ago
Nico de Poel
3a65d37c41
Implemented debug view pass
2 years ago
Nico de Poel
60336253b7
Fixed a couple of incorrect sizes
2 years ago
Nico de Poel
61e03ec329
Couple of minor fixes and comment changes
2 years ago
Nico de Poel
78f9142738
Fixed a few small resource binding errors
2 years ago
Nico de Poel
d609eae96f
Added profiling samplers to make debugging a bit easier
2 years ago
Nico de Poel
1bcba64b26
Fixed crash in reactive mask pass due to unused CB binding
2 years ago
Nico de Poel
d6bb123157
Removed unused resource definitions
2 years ago
Nico de Poel
3908ee767b
Modified passes with updated SRV and UAV bindings
2 years ago
Nico de Poel
9bc90e4853
Updated dispatching function with new passes and modified buffer clears
2 years ago
Nico de Poel
aca067bff0
Updated debug checks
2 years ago
Nico de Poel
4a18c3a6c4
Defined the new passes in code and renamed some of the old ones
2 years ago
Nico de Poel
6c024407cb
Defined all of the resources needed for FSR 3.1, left the old stuff intact for now so it still compiles.
2 years ago
Nico de Poel
3cd8b41224
Updated upscaler constants definition and implemented modifications to the constants setup function.
2 years ago
Nico de Poel
0e481544bf
Updated shader assets names and references for the new collection of passes.
2 years ago
Nico de Poel
b03217eebd
Initial update of dispatch parameters and enums for FSR 3.1
2 years ago
Nico de Poel
d21b57083b
Fixed potential nullref when Destroy gets called repeatedly
2 years ago
Nico de Poel
8b4a7fd78f
Correctly destroy resources when not in play mode
2 years ago
Nico de Poel
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)
2 years ago
Nico de Poel
734770b75e
Callbacks don't need to be passed to the FSR3 Context anymore.
2 years ago
Nico de Poel
2d05d08f86
Added the ability to clone the shaders, in case multiple FSR3 instances with different configurations are needed.
2 years ago
Nico de Poel
fdcc85355c
Try our best to ensure a shaders asset is assigned to the image effect component.
2 years ago
Nico de Poel
bd98fdf00d
Turned shaders aggregate into a scriptable object, with a default asset instance that automatically resets to look up the correct shader references.
2 years ago
Nico de Poel
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.
2 years ago
Nico de Poel
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.
2 years ago
Nico de Poel
ebb9d84171
Rename FSR2 to FSR3 Upscaler, part 3: missing bits.
2 years ago
Nico de Poel
9854cd1279
Rename FSR2 to FSR3 Upscaler, part 2: class and file names.
2 years ago
Nico de Poel
62a924ae83
Rename FSR2 to FSR3 Upscaler, part 1: strings and comments.
2 years ago
Nico de Poel
c2f397892f
Forward ported TCR autogen pass to fit in with the rest of the FSR3 shader code
2 years ago
Nico de Poel
c83c3e5805
Cleaned up compute shader initialization, as the Nvidia-specific FP16 exception for the accumulate stage doesn't seem to be required anymore.
2 years ago
Nico de Poel
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.
2 years ago
Nico de Poel
fa1704e65f
First working proof of concept of FSR3 upscaling in Unity
2 years ago
Nico de Poel
c010b6aa28
Renamed Pipelines to Passes
2 years ago
Nico de Poel
22701fdd17
Renamed RenderTargetView to ResourceView, which is a bit shorter to type and covers the essence well.
2 years ago
Nico de Poel
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.
2 years ago
Nico de Poel
d8a4bc3f61
Unity 2020.1 compatibility testing results
2 years ago
Nico de Poel
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.
2 years ago
Nico de Poel
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.
2 years ago
Nico de Poel
7c41364109
Set constant buffer data as part of the command buffers, instead of immediately.
3 years ago
Nico de Poel
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.
3 years ago
Nico de Poel
c65cab824e
Clear auto-exposure texture using zeroes on Metal. Should fix black screen flashes on accumulation reset, when auto-exposure is enabled.
3 years ago
Nico de Poel
e577240354
Reset atomic counter on any kind of reset, not just on first execution. Fixes black screen on Metal when doing a history reset.
3 years ago
Nico de Poel
8c43881c8d
Added zero check to make undo mipmap bias offset an idempotent operation
3 years ago
Nico de Poel
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.
3 years ago
Nico de Poel
bc3192fc40
Made undoing of mipmap bias a distinct separate callback, so that it can be overridden by client apps.
3 years ago
Nico de Poel
9e53cf52f8
Skip textures that don't have mipmaps and thus don't have any use for a mipmap bias
3 years ago
Nico de Poel
b3bc46fcb7
Moved management of aliasable resources to the Fsr2Resources class and gave the methods more logical names.
3 years ago
Nico de Poel
3f17ca1fe2
Revert "Create temporary resources at actual render size, further reducing VRAM usage when dynamic resolution is in effect."
This reverts commit a2c1211d98 .
3 years ago