Nico de Poel
79f2ab14bf
Removed unnecessary aspect ratio lines that broke screen aspect when using non-standard viewports.
2 years ago
Nico de Poel
3fcb2cfc57
Renamed Pipelines to Passes
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
05db2a9c39
Changed prebaked RCAS configurations into an array, as there is no need for a dynamically sized list here.
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
56d0050a72
Create opaque-only color buffer copy after opaque-only post-processing is done, and use the correct color format for the copy.
This creates a more accurate opaque-only reference for the auto-reactive pass, and improves compatibility with custom opaque-only effects.
3 years ago
Nico de Poel
51c5a44c1a
Set constant buffer data as part of the command buffers, instead of immediately.
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
a73b7ba0e2
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
5ee49f68a8
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
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
0b7ae8ac05
Disable plugin importer settings on all FSR2 header include files
3 years ago
Nico de Poel
3a98642307
Restore original camera target texture if it hasn't been reset after FSR2 is disabled
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
17eb3f7700
Cleaned up the dynamic resolution feature by allowing dynamic scale to be disabled on screen-space RTs and globally disabling dynamic res only once, after upscaling.
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
3ae0a91944
Disable dynamic resolution on render targets created during and after FSR2 upscaling.
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
1e2e8b6a12
Release FSR2 resources when it's not in use. This frees up VRAM but also ensures that the mipmap bias is undone when switching to another AA option.
3 years ago
Nico de Poel
c6c45fc2bc
Moved management of aliasable resources to the Fsr2Resources class and gave the methods more logical names.
3 years ago
Nico de Poel
70c7ea0e51
Restored compatibility with Unity versions older than 2021.2, which didn't have the LocalKeyword struct yet.
3 years ago
Nico de Poel
6504adeea6
Create temporary resources at actual render size, reducing VRAM usage when dynamic resolution is in effect.
3 years ago
Nico de Poel
7ba0dc48dc
Updated shaders to FSR 2.2.1
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
c37b796404
Take control of the camera target texture and blit directly to it. This allows FSR2 upscaling to work on cameras that output to a target texture.
3 years ago
Nico de Poel
79211d3dbb
- 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
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
1a063e971f
Use the correct method to release temporary render textures. Fixes memory leaks from RT's not getting released properly.
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
489b8571d2
Reset camera viewport in OnRenderImage when we're not blitting directly to the camera target. This fixes some potential issues with other systems that are affected by when/where the camera viewport is modified.
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
6eeb3f1f46
Added inspector fields for remaining properties
3 years ago
Nico de Poel
c308726c1c
Don't use FSR2 when in edit mode
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
Nico de Poel
66cf9bf16a
Bits and bobs
3 years ago
Nico de Poel
397710f50f
Added support for auto-transparency & composition
3 years ago
Nico de Poel
ff34164ef3
Added support for auto-reactive mask generation, using a temp RT for storing the opaque-only image.
3 years ago
Nico de Poel
ea05e5da58
Perform OnRenderImage blit using an explicit temporary RT for the upscaled output. This can be blitted directly instead of needing an awkward command buffer, and it'll be less likely to cause issues than blitting from and to the same display buffer.
3 years ago