Nico de Poel
47d40fb71d
More accurate representation of where SystemInfo.computeSubGroupSize is available
3 years ago
Nico de Poel
e0027ed77a
Added MIT license header to every source file, similar to the FFX FSR2 codebase
3 years ago
Nico de Poel
1cc0de7c89
Moved Shader ID constants to a separate class file
3 years ago
Nico de Poel
1ff980bea9
Changing my mind yet again about directory names
3 years ago
Nico de Poel
da651c3d6f
Moved some files
3 years ago
Nico de Poel
8f1be6d3e6
Re-added transparency & composition parameter, even though we never use it and just fall back to the default reactivity mask, we officially support it as an input now.
3 years ago
Nico de Poel
54849cee0f
Use RenderTargetIdentifier magic to bind UAV outputs to SRV inputs, making obsolete the monkey patching of shaders.
Also reorganized the SRV/UAV names to match the ordering from the FSR2 source.
3 years ago
Nico de Poel
5ed7a5279b
Progressed implementation of reactive mask generation pass.
Added temporary RT to contain the generated reactive mask, bind it to the FSR2 inputs, and made it available as a toggle on the script.
3 years ago
Nico de Poel
c1326fc261
Added some comments to the main FSR2 classes
3 years ago
Nico de Poel
86c16e3694
- Replaced all input/output parameters with RenderTargetIdentifiers, allowing more flexibility in how these resources are assigned
- Cleaned up main MonoBehaviour ahead of a big refactor, and added camera event-based command buffers to set opaque-only and motion vector resources
3 years ago
Nico de Poel
776700e837
Allow input textures to be set outside of FSR2 context dispatch, opening up new avenues for optimizations.
Started with setting motion vectors and output RT directly from the Unity command buffer, blitting to the destination RT only when necessary.
3 years ago
Nico de Poel
903c2f71f3
Updated code to make it compatible with Unity 2020.1, i.e. the oldest version that's technically usable.
3 years ago
Nico de Poel
12b5791cd2
Enabled 16-bit floating point support by changing the unused 1D Texture option into an FP16 option, which makes its usage configurable by the game dev.
Also included the workaround to force FP32 in the accumulate pass on Nvidia cards.
3 years ago
Nico de Poel
6c15840df8
Fixed LUT data by using R32_SFloat format instead. Increases VRAM usage a bit but for these small LUTs that's okay.
Changed filter mode for temp RTs to just default, to make it more clear we're not specifically choosing any filter mode; how these RTs are sampled is determined by the shaders.
3 years ago
Nico de Poel
0f584b1098
Implemented generate reactive pass, which can be used separately from the main FSR2 upscale process.
Untested still, but its fairly straightforward.
3 years ago
Nico de Poel
dafae40776
Further tweaks to camera jitter parameters and now IT'S WORKING!! 🥳
3 years ago
Nico de Poel
1ca5a36f3e
Cleanup and minor details
3 years ago
Nico de Poel
13eb24289e
Initial implementation of accumulation pass. It's doing... something but it's definitely not correct yet.
Changed scene luminance into a persistent RT, since that makes it easier to control mipmaps and bind specific mip levels.
3 years ago
Nico de Poel
d044cf2789
Moved resources into their own source file, to make it easier to pass them to pipelines in bulk. Added creation of resources for the accumulate pass.
3 years ago
Nico de Poel
6b74532793
Some cleanup and a few small details
3 years ago
Nico de Poel
650e805af8
Combined color and depth into a single dispatch parameter, which makes it easier to follow what's going on at the various stages.
3 years ago
Nico de Poel
c184748907
Separate out depth from the color buffer using RenderTextureSubElement, which does work now.
This whittles down the additional blitting to just motion vectors, with only a single shader/material required.
3 years ago
Nico de Poel
56da810b50
Implemented lock pass
3 years ago
Nico de Poel
38d5f81ccc
Added missing RT releases
3 years ago
Nico de Poel
934a3d60fa
Implemented depth clip pass. Solved the problem of UAV/SRV name mismatch by monkey-patching the relevant shaders. Added default reactive mask.
3 years ago
Nico de Poel
834c396321
Color, depth and motion vectors are now provided as regular texture inputs to the compute shaders, by blitting them from the game camera ahead of time.
3 years ago
Nico de Poel
8633cdcfc2
Initial implementation of Reconstruct & Dilate pass. Got a pretty decent way of dealing with double-buffered resources.
Uploading Lanczos table in R16_SFloat format using pre-normalized values.
Fixed frametime delta being converted improperly.
3 years ago
Nico de Poel
1b41f6b2d7
Provide pipelines with the entire context description, which makes intiialization a bit simpler. Also provide it when registering resources so that the corrext *max* render size can be used. Started on the reconstruct depth pipeline.
3 years ago
Nico de Poel
16f529bce8
Made shading change mip level into a reusable const value, and fixed mip sizes for exposure RTs.
Actually tested the output of the luminance pyramid shader now and it seems to be working.
3 years ago
Nico de Poel
cd414d75f1
Register aliasable UAV resources globally, before and after scheduling shader dispatches, so that all compute shaders can make use of them but without requiring a whole lot of additional resource management code.
3 years ago
Nico de Poel
9489a19cd8
Progress on managing resources. Compute luminance pyramid shader is starting to do something.
Also looked at the Lanczos LUT resource and ran into some roadblocks there.
3 years ago
Nico de Poel
16055d7dd9
Continued pipeline implementations: declaring all input/output bindings using shared resource IDs.
3 years ago
Nico de Poel
913c5879fa
Started work on luminance pyramid and acculumate pipelines.
Added keywords for customization options to the compute shaders using multi_compile_local.
3 years ago
Nico de Poel
08e034584c
Reorganized context and dispatch code:
- Resource binding and shader dispatch is now done in separate Pipeline classes per stage, mirroring the design of the original FSR2 code.
- Moved some classes and structs around to make them available outside of the Fsr2Context class.
3 years ago