From 5bde9cddfcfeb074d65da438849508c1fd5e5ef4 Mon Sep 17 00:00:00 2001 From: BlueSkyDefender Date: Thu, 23 May 2024 16:45:58 -0600 Subject: [PATCH] Multi Update for 3D Shaders 3D Shader Update: With Letter Box Masking I made it lower the power of Halo Reduction to reduce warping in game that place bars in depth. Overwatch Profile Added: +Ghost of Tsushima DIRECTOR'S CUT --- Shaders/Overwatch.fxh | 158 ++++++++++++++++++++++++++++++++++++ Shaders/SuperDepth3D.fx | 12 ++- Shaders/SuperDepth3D_VR+.fx | 12 ++- 3 files changed, 176 insertions(+), 6 deletions(-) diff --git a/Shaders/Overwatch.fxh b/Shaders/Overwatch.fxh index 5b26a02..7bd4056 100644 --- a/Shaders/Overwatch.fxh +++ b/Shaders/Overwatch.fxh @@ -27845,6 +27845,164 @@ static const int Not_Compatible_Warning_D = 0; //Not Compatible Warning #define DSW 1 #define DRS 1 //#define FOV 1 +#elif (App == 0xFA493601 ) //Ghost of Tsushima DIRECTOR'S CUT Steam + //#define DS_Z 2 // Set View Mode + #define DA_W 1 // Set Linerzation + //#define DB_X 1 // Flip + #define DA_X 0.025 // ZPD + //#define DF_Y 0.035 // Seperation + #define DA_Y 85.0 // Near Plane Adjustment + //#define DA_Z .000 // Linerzation Offset + #define DS_Y 2 // Linerzation Offset Effects only distance if true + #define DB_Z 0.025 // Auto Depth Protection + #define DE_X 3 // ZPD Boundary + #define DE_Y 0.750 // Set ZPD Boundary Level Zero + #define DE_Z 0.375 // Speed that Boundary is Enforced + //#define AFD 1 // Alternate Frame Detection - May be phased out + #define DG_W 0.25 // Shift Boundary Out of screen 0.5 and or In screen -0.5 + #define OIL 3 // Set How many Levels We use for RE_Fix 0 | 1 | 2 | 3 if 1 then it's float2(0,0) for OIF and DI_W + #define OIF float4(0.5,0.375,0.25,0.125)// Fix enables if Value is > 0.0 + #define DI_W float4(0.75,1.25,2.5,5.0) // Like Shift Boundary DG_W But 0 to inf + //#define CWH 4 //ZPD Weapon Hand Consideration For Masking 0 is Off | 1 Is Full | 2 Half Right screen Mask And Not to be used with Weapon Profiles. + //#define WBA 2.0 //ZPD Weapon Boundary Alt Adjust power for CWH + //#define FTM 4 // Fast Trigger Mode If this enabled then Level 1 and > switches instantly. + #define WND 1.5 //Weapon Near Pushes depth in and adjust perspective to match. + //#define DG_Z 0.025 // Min Weapon Hands That are apart of world with Auto and Trim + //#define DS_X float3(0.025,0,1) // Min Weapon bit only triggers when a OIL Level is set and set here on .y + //#define DE_W 0.50 // Auto + //#define DI_Z 0.010 // Trim + //#define DF_W float4(0.0001,0.0005,0.0,0.05)// Edge & Scale + #define DAA_W 2 //Warp/Halo Masking Type + //#define EDU 1 //Elevate Detectors Up effects ZPD + //#define TMD 1 + + //Stencil UI & Detection + #define SUI 5 //Off 0 | Stencil One | Stencil Two | Stencil Three | Stencil Four | Stencil Five | Stencil Six + + #define SSA 1 //Off 0 | 1 Square | 2 Circle + //#define SNA 1 //Off 0 | 1 Trigger on Aim + #define DDD_X float4( 0.355 , 0.250 , 0.162 , 0.263) //Pos A = XY Any & B = ZW Lock + #define DDD_Y float4( 0.060 , 0.170 , 0.178 , 0.530) //Pos C = XY Any & UI Postion + #define DDD_Z float4( 9.0, 0.0, 30.0, 1000.0) //Detection Value 0-30 for A = X, B = Y, & C = Z. The Last Value is a Wild Card amount W is for X and Z. + #define DDD_W float4( 0.318, 0.105, 1.0, 0.0) //X is Hoz Size and Y is Vert Size, Z is Inversion amount and W is Depth set elevation with 0.0-0.5 > is Auto. + + #define SSB 1 //Off 0 | 1 Square | 2 Circle + //#define SNB 1 //Off 0 | 1 Trigger on Aim + #define DEE_X float4( 0.364 , 0.271 , 0.420 , 0.502) //Pos A = XY Any & B = ZW Lock + #define DEE_Y float4( 0.639 , 0.561 , 0.5 , 0.403) //Pos C = XY Any & UI Postion + #define DEE_Z float4( 24.0, 0.0, 29.0, 1000.0) //Detection Value 0-30 for A = X, B = Y, & C = Z. The Last Value is a Wild Card amount W is for X and Z. + #define DEE_W float4( 0.354, 0.336, 1.0, 1.0) //X is Hoz Size and Y is Vert Size, Z is Inversion amount and W is Depth set elevation with 0.0-0.5 > is Auto. + + #define SSC 1 //Off 0 | 1 Square | 2 Circle + //#define SNC 1 //Off 0 | 1 Trigger on Aim + #define DFF_X float4( 0.778 , 0.678 , 0.773 , 0.847) //Pos A = XY Any & B = ZW Lock + #define DFF_Y float4( 0.500 , 0.744 , 0.850 , 0.5) //Pos C = XY Any & UI Postion + #define DFF_Z float4( 27.0, 0.0, 30.0, 1000.0) //Detection Value 0-30 for A = X, B = Y, & C = Z. The Last Value is a Wild Card amount W is for X and Z. + #define DFF_W float4( 0.250, 0.000, 1.0, 0.0) //X is Hoz Size and Y is Vert Size, Z is Inversion amount and W is Depth set elevation with 0.0-0.5 > is Auto. + + #define SSD 1 //Off 0 | 1 Square | 2 Circle + //#define SND 1 //Off 0 | 1 Trigger on Aim + #define DGG_X float4( 0.778 , 0.678 , 0.743 , 0.847) //Pos A = XY Any & B = ZW Lock + #define DGG_Y float4( 0.500 , 0.744 , 0.850 , 0.5) //Pos C = XY Any & UI Postion + #define DGG_Z float4( 27.0, 0.0, 30.0, 1000.0) //Detection Value 0-30 for A = X, B = Y, & C = Z. The Last Value is a Wild Card amount W is for X and Z. + #define DGG_W float4( 0.250, 0.000, 1.0, 0.0) //X is Hoz Size and Y is Vert Size, Z is Inversion amount and W is Depth set elevation with 0.0-0.5 > is Auto. + + #define SSE 1 //Off 0 | 1 Square | 2 Circle + //#define SNE 1 //Off 0 | 1 Trigger on Aim + #define DJJ_X float4( 0.638 , 0.479 , 0.420 , 0.419) //Pos A = XY Any & B = ZW Lock + #define DJJ_Y float4( 0.364 , 0.271 , 0.5 , 0.3615) //Pos C = XY Any & UI Postion + #define DJJ_Z float4( 29.0, 0.0, 24.0, 1000.0) //Detection Value 0-30 for A = X, B = Y, & C = Z. The Last Value is a Wild Card amount W is for X and Z. + #define DJJ_W float4( 0.354, 0.377, 1.0, 1.0) //X is Hoz Size and Y is Vert Size, Z is Inversion amount and W is Depth set elevation with 0.0-0.5 > is Auto. + + #define SSF 0 //Off 0 | 1 Square | 2 Circle + //#define SNF 1 //Off 0 | 1 Trigger on Aim + #define DLL_X float4( 0.500 , 0.500 , 0.500 , 0.500) //Pos A = XY Any & B = ZW Lock + #define DLL_Y float4( 0.500 , 0.500 , 0.5 , 0.5) //Pos C = XY Any & UI Postion + #define DLL_Z float4( 1000.0, 1000.0, 1000.0, 1000.0) //Detection Value 0-30 for A = X, B = Y, & C = Z. The Last Value is a Wild Card amount W is for X and Z. + #define DLL_W float4( 0.0, 0.0, 1.0, .0) //X is Hoz Size and Y is Vert Size, Z is Inversion amount and W is Depth set elevation with 0.0-0.5 > is Auto. + + #define MDD 1 //Set Menu Detection & Direction //Off | 1 Left | 2 Right | 3 Bottom | 4 Top + #define COD 0 //Enable or Disable Cut-Off Direction //Off | 1 Top & Bottom for One & Two or Left and Right for Three & Four + #define DN_X float4( 0.655 , 0.415 , 0.938 , 0.963) //Pos A = XY Any & B = ZW Lock + #define DN_Y float4( 0.655 , 0.500 , 0.0, 0.0) //Pos C = XY Any & D = ZW Match + #define DN_Z float4( 0.0, 0.0, 0.0, 0.0) //Pos E = XY Match & F = ZW Match + #define DN_W float4( 1.0, 0.0 , 0.0, 0.0 ) //Size = Menu [ABC] D E F + #define DJ_Y float4( 3.0, 0.0, 27.0, 1000.0) //Menu Detection Type for A = X, B = Y, & C = Z. The Last Value is a Wild Card amount W is for X and Z. + #define DJ_Z float4( 1000., 1000., 1000, 0.0) //Set Match Tresh and IU Y Elevation or Cut-Off -1-1 + + + //Simple Menu Detection + #define SMD 6 //Off 0 | 1 | 2 | 3 | 4 | 5 | 6 + #define DW_X float4( 0.500 , 0.070 , 0.945 , 0.963) //Pos A = XY Any & B = ZW Lock + #define DW_Y float2( 0.089 , 0.061 ) //Pos C = XY + #define DW_Z float4( 1.0, 0.0, 27.0, 1000.0) //Menu Detection Type for A = X, B = Y, & C = Z. The Last Value is a Wild Card amount W is for X and Z. + + #define DT_X float4( 0.500 , 0.070 , 0.938 , 0.963) //Pos A = XY Any & B = ZW Lock + #define DT_Y float2( 0.089 , 0.061 ) //Pos C = XY + #define DW_W float4( 1.0, 0.0, 27.0, 1000.0) //Menu Detection Type for A = X, B = Y, & C = Z. The Last Value is a Wild Card amount W is for X and Z. + + #define DAA_X float4( 0.646 , 0.219 , 0.945 , 0.963) //Pos A = XY Any & B = ZW Lock + #define DAA_Y float2( 0.096 , 0.364 ) //Pos C = XY + #define DAA_Z float4( 30.0, 0.0, 0.0, 1000.0) //Menu Detection Type for A = X, B = Y, & C = Z. The Last Value is a Wild Card amount W is for X and Z. + + #define DBB_X float4( 0.772 , 0.219 , 0.945 , 0.963) //Pos A = XY Any & B = ZW Lock + #define DBB_Y float2( 0.096 , 0.364 ) //Pos C = XY + #define DBB_Z float4( 30.0, 0.0, 0.0, 1000.0) //Menu Detection Type for A = X, B = Y, & C = Z. The Last Value is a Wild Card amount W is for X and Z. + + #define DHH_X float4( 0.051 , 0.215 , 0.938 , 0.963) //Pos A = XY Any & B = ZW Lock + #define DHH_Y float2( 0.689 , 0.430 ) //Pos C = XY + #define DHH_Z float4( 30.0, 0.0, 3.0, 1000.0) //Menu Detection Type for A = X, B = Y, & C = Z. The Last Value is a Wild Card amount W is for X and Z. + + #define DII_X float4( 0.036 , 0.214 , 0.938 , 0.963) //Pos A = XY Any & B = ZW Lock + #define DII_Y float2( 0.689 , 0.430 ) //Pos C = XY + #define DII_Z float4( 30.0, 0.0, 3.0, 1000.0) //Menu Detection Type for A = X, B = Y, & C = Z. The Last Value is a Wild Card amount W is for X and Z. + + + #define BMT 1 // ZPD and World Scale Balance // I need to phase this out. + #define DF_Z 0.25 // Set the Balance + //#define DAO 1 // Turn On or Off De-Artifact Options For now DAO if set to 1 it's also applys to Hoz + #define DL_Y 0.75 // De-Artifact Only works on some View Modes and causes performance degredation + #define DL_Z -0.125 // Compat Power + //#define DJ_X 0.050 // Range Smoothing + + //#define WSM 6 // Weapon Setting Mode + //#define DB_W 19 // Weapon Profile + //#define AWZ 1 // Anti-Weapon Hand Z-Fighting -1 is shifted to the right a little bit and 1 is center + //#define WBS 0 //Weapon Boundary Switch 0 | 1 + ////#define DF_X float2(0.125,0.250) // ZPD Weapon Boundarys Level 1 and Level 2 + ///#define DJ_W 0.125 // Weapon Depth Limit Location 1 + ///#define DS_W 0.5 // Weapon Depth Limit Location 2 + //#define WFB 0.0 // ZPD Weapon Elevaton for 1 and 2 scales from [0 - 1] + //#define DT_W float2(0.015,0.03)//WH scale and cutoff + //#define WHM 1 //Weapon Hand Masking lets you use DT_Z + //#define DT_Z 0.1 //WH Masking Power from -1 to 1 + //#define LHA //Lower Height Adjustment [0.5]to[0.575] + //#define FRM 0 //Foveated Rendring mode Toggle + //#define ASA 0 + + #define LBM 1 //Letter Box Masking With size Adust for Top and Bottom and 2 is Left and Right + #define DI_X 0.879 + + //#define LBC 1 //Letter Box Correction Offsets With X & Y + //#define LBR 1 + //#define LBE 1 + //#define DH_Z 0.0 + //#define DH_W -0.255 + + //Smooth Mode + //#define SMS 3 //SM Separation Limit - Do Not use any more + #define DL_X 0.5 //SM Tune Limit + //#define DL_W 0.5 //SM Perspective Limit - Do Not use any more + #define DM_X 6 //SM HQ Tune Power - Will be made global + //#define DM_Y 1 //SM HQ VRS Limit + //#define HQT 1 //SM HQ Trigger + //#define FMM 1 //Filter Mode - Need to add this back in the new shader. + //#define NDW 1 + #define PEW 1 + //#define NFM 1 + #define DSW 1 + #define DRS 1 + //#define FOV 1 #else #define NPW 1 //No Profile #endif diff --git a/Shaders/SuperDepth3D.fx b/Shaders/SuperDepth3D.fx index e9372c1..2590bd5 100644 --- a/Shaders/SuperDepth3D.fx +++ b/Shaders/SuperDepth3D.fx @@ -1,7 +1,7 @@ ////----------------// ///**SuperDepth3D**/// //----------------//// - #define SD3D "SuperDepth3D v4.2.2\n" + #define SD3D "SuperDepth3D v4.2.3\n" ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //* Depth Map Based 3D post-process shader //* For Reshade 3.0+ @@ -3430,8 +3430,14 @@ uniform int Extra_Information < float Base_Depth_SubSampled = tex2Dlod(SamplerzBufferN_L, float4( texcoord, 0, lerp(0.0,4.0,Base_Depth_Buffers.x)) ).x; float Base_Depth = lerp(Base_Depth_Buffers.x,Base_Depth_SubSampled,LR_Depth_Mask.x*Sat_Range); - - uint VM_Mip_Cal = VMW_Array[clamp(View_Mode_Warping,0,9)]; + + uint VMW_Switch = View_Mode_Warping; + #if LBM || LetterBox_Masking + float LB_Detection = tex2D(SamplerLumN,float2(1,0.083)).z; + if(LB_Detection) + VMW_Switch *= 0.5; + #endif + uint VM_Mip_Cal = VMW_Array[clamp(VMW_Switch,0,9)]; //Smoothing is not masked so that things that will cause distortions is smooth stronger then thing that don't need it. LR_Depth_Mask = smoothstep(Warping_Masking == 2 ? 0.75 : 1,0,tex2Dlod(SamplerzBufferN_L,float4(texcoord,0,3)).x*(1-LR_Depth_Mask)); float VMW = Warping_Masking == 0 ? VM_Mip_Cal : lerp(VM_Mip_Cal,0,LR_Depth_Mask.x); diff --git a/Shaders/SuperDepth3D_VR+.fx b/Shaders/SuperDepth3D_VR+.fx index b637c7c..cef8a25 100644 --- a/Shaders/SuperDepth3D_VR+.fx +++ b/Shaders/SuperDepth3D_VR+.fx @@ -1,7 +1,7 @@ ////--------------------// ///**SuperDepth3D_VR+**/// //--------------------//// - #define SD3DVR "SuperDepth3D_VR+ v4.2.0\n" + #define SD3DVR "SuperDepth3D_VR+ v4.2.1\n" ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //* Depth Map Based 3D post-process shader //* For Reshade 4.4+ I think... @@ -3241,8 +3241,14 @@ uniform int Extra_Information < float Base_Depth_SubSampled = tex2Dlod(SamplerzBufferVR_L, float4( texcoord, 0, lerp(0.0,4.0,Base_Depth_Buffers.x)) ).x; float Base_Depth = lerp(Base_Depth_Buffers.x,Base_Depth_SubSampled,LR_Depth_Mask.x*Sat_Range); - - uint VM_Mip_Cal = VMW_Array[clamp(View_Mode_Warping,0,9)]; + + uint VMW_Switch = View_Mode_Warping; + #if LBM || LetterBox_Masking + float LB_Detection = tex2D(SamplerLumVR,float2(1,0.083)).z; + if(LB_Detection) + VMW_Switch *= 0.5; + #endif + uint VM_Mip_Cal = VMW_Array[clamp(VMW_Switch,0,9)]; //Smoothing is not masked so that things that will cause distortions is smooth stronger then thing that don't need it. LR_Depth_Mask = smoothstep(Warping_Masking == 2 ? 0.75 : 1, 0,tex2Dlod(SamplerzBufferVR_L,float4(texcoord,0,3)).x*(1-LR_Depth_Mask));