Repository navigation
Share the SMAA, XeGTAO, MacLeod-Boynton, RCAS and dgVoodoo code between games, and draw RCAS from Core - #227
Conversation
…oodoo helpers between the games that copied them
|
This looks pretty good, only recommendation I have is to move the loading of the new Sharpen/SMAA shaders to Core as well instead of having the game load them. could optionally make a helper function in Draw.hpp to easily call these shaders with parametrized inputs. What do you guys think? |
…t size and bind its metrics cbuffer
|
@Izueh moved RCAS to Core |
|
@garamond13 just give your thumbs up if you don't mind relating the GTAO changes to your games. |
|
Maybe make it optional to define own Maybe make denoising opional, in some games it's convinient to rely on games own denoiser. It's done in Dishonored 2.
All fine with me. |
|
@Izueh @garamond13 done |
Moves the shader code that my mods had copied between each other into shared files, and moves the RCAS into Core.
Shared shaders
Shaders/Includes/SMAA_Passes.hlsl: the six SMAA entry points Core draws. EachLuma_SMAA_impl.hlslnow only sets up SMAA and includes it. Used by BL2/TPS, BL GOTY, MEA, MELE, ME1, MoH Airborne and TW2, plus BioShock and MGS4 in a separate commit, since their files were the same copy.Shaders/Includes/XeGTAO.hlsl: the XeGTAO passes from BL GOTY, MELE and TW2. Each game keeps a smallLuma_<Game>_XeGTAO.hlslwith its cbuffers, depth/normal decoding and a few defines.Shaders/Includes/MacLeodBoynton.hlsl: moved from the four identical copies in BL GOTY, ME1, MoH Airborne and TW2.Shaders/Global/Luma_RCAS_PS.hlsl: replaces the seven identicalLuma_*_Sharpen.hlsl.Shaders/Includes/DgVoodoo.hlsl:ApplyDgvMaskand the guarded rcp/log helpers from ME1, MoH Airborne and TW2.RCAS and SMAA in Core
ENABLE_RCAS(default 0, separate fromENABLE_SMAA) makes Core register "RCAS PS".draw.hppaddsPrepareRCAS()andDrawRCAS().DrawSMAA()now rebuilds its intermediates when the target size changes, not only on swapchain init.