Skip to content

Commit

Permalink
Inficolor Update
Browse files Browse the repository at this point in the history
SuperDepth3D Inficolor Update:

Inficolor options where fixed. Some stopped working sometime ago. Fixed issues with scaling with Inficolor Mode active. So not it should be doing what the descriptions tell you.

SuperDepth3D VR Update:

Small adjustment to flow control.

Overwatch Profile added:
+Horizon Forbidden West
  • Loading branch information
BlueSkyDefender committed May 25, 2024
1 parent 5bde9cd commit 93679a1
Show file tree
Hide file tree
Showing 3 changed files with 186 additions and 59 deletions.
121 changes: 121 additions & 0 deletions Shaders/Overwatch.fxh
Original file line number Diff line number Diff line change
Expand Up @@ -28003,6 +28003,127 @@ static const int Not_Compatible_Warning_D = 0; //Not Compatible Warning
#define DSW 1
#define DRS 1
//#define FOV 1
#elif (App == 0x1EDEE7F2 ) //Horizon Forbidden West 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 25.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 1 // 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 1 // 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 float2(0.5,0.375)// Fix enables if Value is > 0.0
#define DI_W float2(0.5,1.25) // 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 2.0 //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

//Lock Out Menu Detectors
#define LMD 1 //Off 0 | 1
#define ISD 0 //Off 0 | 1 //Include Stencils
#define DCC_X float4( 0.565, 0.072 , 0.025 , 0.025) //Pos A = XY Any & B = ZW Lock
#define DCC_Y float2( 0.969 , 0.065 ) //Pos C = XY
#define DCC_Z float4( 28.0, 0.0, 26.0, 26.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.


//Stencil UI & Detection
#define SUI 1 //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.650 , 0.048 , 0.689 , 0.107) //Pos A = XY Any & B = ZW Lock
#define DDD_Y float4( 0.587 , 0.924 , 0.7215 , 0.486) //Pos C = XY Any & UI Postion
#define DDD_Z float4( 27.0, 26.0, 25.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.241, 0.060, 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.

//Simple Menu Detection
#define SMD 4 //Off 0 | 1 | 2 | 3 | 4 | 5 | 6
#define DW_X float4( 0.290 , 0.035 , 0.025 , 0.025) //Pos A = XY Any & B = ZW Lock
#define DW_Y float2( 0.969 , 0.065 ) //Pos C = XY
#define DW_Z float4( 26.0, 0.0, 26.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.313 , 0.037 , 0.025 , 0.025) //Pos A = XY Any & B = ZW Lock
#define DT_Y float2( 0.969 , 0.065 ) //Pos C = XY
#define DW_W float4( 26.0, 0.0, 26.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.287 , 0.037 , 0.025 , 0.025) //Pos A = XY Any & B = ZW Lock
#define DAA_Y float2( 0.969 , 0.065 ) //Pos C = XY
#define DAA_Z float4( 28.0, 0.0, 26.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.310 , 0.039 , 0.025 , 0.025) //Pos A = XY Any & B = ZW Lock
#define DBB_Y float2( 0.969 , 0.065 ) //Pos C = XY
#define DBB_Z float4( 28.0, 0.0, 26.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.500 , 0.500 , 0.500 , 0.500) //Pos A = XY Any & B = ZW Lock
#define DHH_Y float2( 0.500 , 0.500 ) //Pos C = XY
#define DHH_Z float4( 1000.0, 1000.0, 1000.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.500 , 0.500 , 0.500 , 0.500) //Pos A = XY Any & B = ZW Lock
#define DII_Y float2( 0.500 , 0.500 ) //Pos C = XY
#define DII_Z float4( 1000.0, 1000.0, 1000.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.35 // 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.375 // De-Artifact Only works on some View Modes and causes performance degredation
#define DL_Z 0.5 // 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 5 //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 DAA 1
//#define FOV 1
#else
#define NPW 1 //No Profile
#endif
Expand Down
64 changes: 34 additions & 30 deletions Shaders/SuperDepth3D.fx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
////----------------//
///**SuperDepth3D**///
//----------------////
#define SD3D "SuperDepth3D v4.2.3\n"
#define SD3D "SuperDepth3D v4.2.4\n"
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//* Depth Map Based 3D post-process shader
//* For Reshade 3.0+
Expand Down Expand Up @@ -945,7 +945,7 @@ uniform int SuperDepth3D <
ui_tooltip = "Automatically Balance between ZPD Depth and Scene Depth.\n"
"Default is Off.";
ui_category = "Stereoscopic Options";
> = 2;
> = ABE;

uniform float Inficolor_OverShoot <
ui_type = "drag";
Expand Down Expand Up @@ -2910,10 +2910,20 @@ uniform int Extra_Information <
float4 ( 0.75 , Switch_Height_Point, 0.625, Switch_Height_Point),//Right Wide 6
float4 (FP_IO_Pos().x,FP_IO_Pos().y,0.0,0.0), //Eye Tracker 7
float4 (FP_IO_Pos().x,FP_IO_Pos().y,0.0,0.0)}; //Eye Tracker Alt 8

float Overshoot = 1 + saturate(Inficolor_OverShoot),
AB_EX = lerp(Depth(XYArray[Auto_Balance_Ex].xy) , Depth(XYArray[Auto_Balance_Ex].zw), Auto_Balance_Ex > 3 && Auto_Balance_Ex < 7 ? 0.5 : 0 );
return float2(Auto_Balance_Ex > 0 ? Inficolor_3D_Emulator ? Overshoot * saturate(AB_EX * 2) : saturate(lerp(AB_EX * 2 , Avr_Mix(float2(0.5,Switch_Height_Point)).x , 0.25) ) : 1,

if(Auto_Balance_Ex > 0)
{
AB_EX = saturate(lerp(AB_EX * Overshoot , Avr_Mix(float2(0.5,Switch_Height_Point)).x , 0.25) );
if(Inficolor_3D_Emulator)
AB_EX = Overshoot * AB_EX;
}
else
AB_EX = 1;

return float2(AB_EX,
saturate(lerp( Depth( float2(0.5,Switch_Height_Point) ) * 2 , Avr_Mix(float2(0.5,Switch_Height_Point)).x , 0.25) ) ) ;
}

Expand All @@ -2931,7 +2941,7 @@ uniform int Extra_Information <
float3x3 Fade_Pass = Fade(texcoord); //[0][0] = F | [0][1] = F | [0][2] = F
//[1][0] = F | [1][1] = N | [1][2] = 0
//[2][0] = 0 | [2][1] = 0 | [2][2] = 0
float2 Min_Trim = float2(SP_Min,Inficolor_3D_Emulator ? WZPD_and_WND.w : WZPD_and_WND.w);
float2 Min_Trim = float2(SP_Min,WZPD_and_WND.w);
#else
float3 Fade_Pass_A = float3( tex2D(SamplerzBuffer_BlurN,float2(0,0.083)).x,
tex2D(SamplerzBuffer_BlurN,float2(0,0.250)).x,
Expand All @@ -2947,7 +2957,7 @@ uniform int Extra_Information <

SP_Min = lerp(SP_Min,Level_Control.x, saturate(Select_Min_LvL_Trigger) );

float2 Min_Trim = float2(SP_Min, Inficolor_3D_Emulator ? WZPD_and_WND.w : WZPD_and_WND.w);
float2 Min_Trim = float2(SP_Min,WZPD_and_WND.w);
#endif

if(Inficolor_3D_Emulator && Inficolor_Near_Reduction)
Expand Down Expand Up @@ -3010,7 +3020,7 @@ uniform int Extra_Information <
}

float4 Conv(float2 MD_WHD,float2 texcoord,float2 abs_WZPDB)
{ float WConverge = 0.030, D = MD_WHD.x, Z = Zero_Parallax_Distance, WZP = 0.5, ZP = 0.5, W_Convergence = Inficolor_Near_Reduction ? WConverge * 0.8 : WConverge, WZPDB, WZPD_Switch, Distance_From_Bottom = lerp(0.9375,1.0,saturate(WFB)), ZPD_Boundary_Adjust = ZPD_Boundary_n_Fade.x, Store_WC, Set_Max_Depth = 1.0;
{ float WConverge = 0.030, D = MD_WHD.x, Z = Zero_Parallax_Distance, WZP = 0.5, ZP = 0.5, W_Convergence = Inficolor_Near_Reduction ? WConverge * 0.8 : WConverge, WZPDB, WZPD_Switch, Distance_From_Bottom = lerp(0.9375,1.0,saturate(WFB)), ZPD_Boundary_Adjust = ZPD_Boundary_n_Fade.x, Store_WC;
//Screen Space Detector.
if (abs_WZPDB.x > 0)
{
Expand Down Expand Up @@ -3055,9 +3065,11 @@ uniform int Extra_Information <

if (Auto_Depth_Adjust > 0)
D = AutoDepthRange(D,texcoord);

ZP = saturate( ZPD_Balance * max(0.5, Auto_Balance_Selection().x));

#if Inficolor_3D_Emulator
ZP = saturate( ZPD_Balance * Auto_Balance_Selection().x);
#else
ZP = saturate( ZPD_Balance * max(0.5, Auto_Balance_Selection().x));
#endif
float4 Set_Adjustments = RE_Set_Adjustments();float2 SC_Adjutment = DT_W;
float DOoR_A = smoothstep(0,1,tex2D(SamplerLumN,float2(0, 0.250)).z), //ZPD_Boundary
DOoR_B = smoothstep(0,1,tex2D(SamplerLumN,float2(0, 0.416)).z), //Set_Adjustments X
Expand Down Expand Up @@ -3108,13 +3120,13 @@ uniform int Extra_Information <
ZP = 1;

ZP = min(ZP, Auto_Balance_Clamp);


//* lerp(1,2,D) // place this after saturate(Convergence)
float Mod_Depth = lerp(Convergence,lerp(D,Convergence,saturate(Convergence) ), ZP);
#if Inficolor_3D_Emulator
Set_Max_Depth = Inficolor_Max_Depth;
Mod_Depth = lerp(Mod_Depth,min(saturate(Inficolor_Max_Depth),Mod_Depth),saturate(D * 0.5));
#endif
D = min(saturate(Set_Max_Depth),D);
//* lerp(1,2,D) // place this after saturate(Convergence)
return float4( lerp(Convergence,lerp(D,Convergence,saturate(Convergence) ), ZP), lerp(W_Convergence,WD,WZP), Store_WC, WZPD_Switch);
return float4( Mod_Depth, lerp(W_Convergence,WD,WZP), Store_WC, WZPD_Switch);
}

float WeaponMask(float2 TC,float Mips)
Expand Down Expand Up @@ -4031,6 +4043,13 @@ uniform int Extra_Information <
//if(Stereoscopic_Mode == 5)//Need to work on this later.
// Persp *= 0.25;
float2 TCL = texcoord, TCR = texcoord, TCL_T = texcoord, TCR_T = texcoord, TexCoords = texcoord;


#if Inficolor_3D_Emulator
if(Inficolor_Auto_Focus)
Persp *= lerp(0.75,1.0, saturate(smoothstep(-0.0175,min(0.5,0.13),Avr_Mix(texcoord).x)) );
#endif

TCL += Persp; TCR -= Persp; TCL_T += Persp; TCR_T -= Persp;
#if !Reconstruction_Mode
#if !Inficolor_3D_Emulator
Expand All @@ -4053,21 +4072,6 @@ uniform int Extra_Information <
}
#endif
#endif

#if Inficolor_3D_Emulator
#if Compatibility_DD
if (Depth_Detection == 1)
{
if (!DepthCheck)
Persp = 0;
}
#endif
if (Cancel_Depth)
Persp = 0;

if(Inficolor_Auto_Focus)
Persp *= lerp(0.75,1.0, smoothstep(0,0.5,tex2D(SamplerLumN,float2(0,0.750)).z));
#endif

float4 color, Left_T, Right_T, L, R, Left_Right;
#if Reconstruction_Mode
Expand Down
Loading

0 comments on commit 93679a1

Please sign in to comment.