Nico de Poel
20a5dc2e5b
Moved FSR2 and FSR3 classes into their own sub-namespaces. This fixes an ambiguity when compiling for Unity 2020.x and is also more future-proof with an eye on porting over more FidelityFX technologies.
2 years ago
Nico de Poel
de482efcbf
Added FSR 3.1 implementation and moved it plus FSR 2.2 into a separate package.
2 years ago
Nico de Poel
7911e82087
Added custom FSR3 upscaler for HDRP 17, overriding Unity's FSR2 native plugin package.
2 years ago
Nico de Poel
d214976e1f
- Applied correct macros to input and output texture definitions for HDRP support
- Correctly destroy resources when not in play mode
- Prevent Unity from treating shader include headers as native plugin code
2 years ago
Nico de Poel
1cfca9d066
Upgraded to FSR 3.0 Upscaler and PPV2 v3.4.0
2 years ago
Nico de Poel
982c41cc20
Refactoring work:
- Reworked input/output resource management using a new ResourceView 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 allows the input/output resource debug checks to happen every frame for that frame.
- Changed prebaked RCAS configurations into an array, as there is no need for a dynamically sized list here.
- Renamed Pipelines to Passes.
2 years ago
Nico de Poel
564bd71f5a
Added a workaround for the missing SetBufferData method in Unity 2020.x, which was still named SetComputeBufferData there.
2 years ago
Nico de Poel
66957fb73b
Set constant buffer data as part of the command buffers, instead of immediately.
3 years ago
Nico de Poel
8b09078a0d
Clear initial auto-exposure value to zero instead of negative one. Fixes black screen flashes on Metal when performing an accumulation reset.
3 years ago
Nico de Poel
2adbc10157
Reset atomic counter on any kind of reset, not just on first execution. Fixes black screen on Metal when performing a history reset.
3 years ago
Nico de Poel
8ca48e06ef
Refactored mipmap bias callbacks such that the render pipeline integration does not need to maintain any bias offset state.
Added NaN/Infinity/Zero checks to the standard mipmap bias callback implementations.
3 years ago
Nico de Poel
24ae1957d6
Small tweaks:
- Disable plugin importer settings on all FSR2 header include files.
- 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
6e427baad0
Added support for dynamic resolution scaling using ScalableBufferManager.
3 years ago
Nico de Poel
c2f6fa04c5
Moved management of aliasable resources to the Fsr2Resources class and gave the methods more logical names.
3 years ago
Nico de Poel
aa69f09d17
Restored compatibility with Unity versions older than 2021.2, which didn't have the LocalKeyword struct yet.
3 years ago
Nico de Poel
9046c34e69
Create temporary resources at actual render size, reducing VRAM usage when dynamic resolution is in effect.
3 years ago
Nico de Poel
955ce3f190
- Consolidated accumulate and accumulate+sharpen pipelines into a single pipeline, with the sharpening option being changed into a local keyword that can be enabled or disabled on-the-fly. This removes the need for an additional copy of the accumulate shader, saving a considerable amount of memory.
- Changed the atomic counter from a temporary RT that gets reset every frame, to a permanent resource that gets set to 0 only on the first execution frame. Fixes auto-exposure causing a black screen on MacOS.
3 years ago
Nico de Poel
d2e6eedf37
Reworked the image effect integration, breaking up things and removing unnecessary parts to improve clarity and readability.
This makes it more effective as an example of how to integrate FSR2 into a render pipeline.
3 years ago
Nico de Poel
3cd852ba8f
Fixed the ESRAM-related visual issue on Xbox One when auto-reactive or auto-TCR is enabled, by explicitly controlling the lifecycle of the opaque-only color input render texture.
Previously the code relied on undefined behavior, whereby an already released temporary render texture just happened to remain in memory at the same location. On Xbox One with its unique ESRAM cache this would fail.
3 years ago
Nico de Poel
e69ea6dd10
Added a workaround for HDRP using texture arrays for its camera buffers on some platforms.
Also cleaned up some unused keywords to reduce shader compile times.
3 years ago
Nico de Poel
5c0bd697e1
Clear the atomic counter used by the luminance pyramid pass. This fixes auto-exposure being broken and causing a black screen on some platforms (Xbox, OpenGL).
3 years ago
Nico de Poel
234bd4e163
Added support for the experimental automatic Transparency, Compostion & Reactive masks generation pass.
3 years ago
Nico de Poel
73346a5054
Added a dummy field to the main FSR2 constant buffer, to make it exactly 128 bytes long. This fixes a data alignment issue on iOS Metal.
3 years ago
Nico de Poel
19894d5c45
FSR 2.2 for Unity open source release
3 years ago