Requests for effect ports to ReShade 3.0
- Insomnia
-
Darksider-J wrote: I'm missing the following shader:
- Cross Process by MartyMcFly.
Thank you in advance.
/*
Coded by Gilcher Pascal aka Marty McFly
Amateur port by Insomnia
*/
uniform float CrossContrast <
ui_type = "drag";
ui_min = 0.50; ui_max = 2.0;
ui_tooltip = "Contrast";
> = 1.0;
uniform float CrossSaturation <
ui_type = "drag";
ui_min = 0.50; ui_max = 2.00;
ui_tooltip = "Saturation";
> = 1.0;
uniform float CrossBrightness <
ui_type = "drag";
ui_min = -1.000; ui_max = 1.000;
ui_tooltip = "Brightness";
> = 1.0;
uniform float CrossAmount <
ui_type = "drag";
ui_min = 0.05; ui_max = 1.50;
ui_tooltip = "Cross Amount";
> = 0.10;
#include "ReShade.fxh"
float3 CrossPass(float4 position : SV_Position, float2 texcoord : TexCoord) : SV_Target
{
float3 color = tex2D(ReShade::BackBuffer, texcoord).rgb;
float2 CrossMatrix [3] = {
float2 (1.03, 0.04),
float2 (1.09, 0.01),
float2 (0.78, 0.13),
};
float3 image1 = color.rgb;
float3 image2 = color.rgb;
float gray = dot(float3(0.5,0.5,0.5), image1);
image1 = lerp (gray, image1,CrossSaturation);
image1 = lerp (0.35, image1,CrossContrast);
image1 +=CrossBrightness;
image2.r = image1.r * CrossMatrix[0].x + CrossMatrix[0].y;
image2.g = image1.g * CrossMatrix[1].x + CrossMatrix[1].y;
image2.b = image1.b * CrossMatrix[2].x + CrossMatrix[2].y;
color.rgb = lerp(image1, image2, CrossAmount);
return color;
}
technique Cross
{
pass
{
VertexShader = PostProcessVS;
PixelShader = CrossPass;
}
}
There.
![:) :)](/media/kunena/emoticons/smile.png)
- Darksider-J
-
- Myashi
-
Insomnia wrote:
Darksider-J wrote: I'm missing the following shader:
- Cross Process by MartyMcFly.
Thank you in advance./* Coded by Gilcher Pascal aka Marty McFly Amateur port by Insomnia */ uniform float CrossContrast < ui_type = "drag"; ui_min = 0.50; ui_max = 2.0; ui_tooltip = "Contrast"; > = 1.0; uniform float CrossSaturation < ui_type = "drag"; ui_min = 0.50; ui_max = 2.00; ui_tooltip = "Saturation"; > = 1.0; uniform float CrossBrightness < ui_type = "drag"; ui_min = -1.000; ui_max = 1.000; ui_tooltip = "Brightness"; > = 1.0; uniform float CrossAmount < ui_type = "drag"; ui_min = 0.05; ui_max = 1.50; ui_tooltip = "Cross Amount"; > = 0.10; #include "ReShade.fxh" float3 CrossPass(float4 position : SV_Position, float2 texcoord : TexCoord) : SV_Target { float3 color = tex2D(ReShade::BackBuffer, texcoord).rgb; float2 CrossMatrix [3] = { float2 (1.03, 0.04), float2 (1.09, 0.01), float2 (0.78, 0.13), }; float3 image1 = color.rgb; float3 image2 = color.rgb; float gray = dot(float3(0.5,0.5,0.5), image1); image1 = lerp (gray, image1,CrossSaturation); image1 = lerp (0.35, image1,CrossContrast); image1 +=CrossBrightness; image2.r = image1.r * CrossMatrix[0].x + CrossMatrix[0].y; image2.g = image1.g * CrossMatrix[1].x + CrossMatrix[1].y; image2.b = image1.b * CrossMatrix[2].x + CrossMatrix[2].y; color.rgb = lerp(image1, image2, CrossAmount); return color; } technique Cross { pass { VertexShader = PostProcessVS; PixelShader = CrossPass; } }
There.
Hi Insomnia,
I saw you're importing lots of shaders
![:D :D](/media/kunena/emoticons/laughing.png)
You've already ported reinhard linear, i was wandering if there's any chance you can port even the Marty's Reinhard.
It is one of the last i miss. It would be much appreciated
![:) :)](/media/kunena/emoticons/smile.png)
To everyone else: I've been busy on Mafia 3 so i didn't follow the forum lately. Anyone can tell me if Spherical Tonemap have been ported?
- Insomnia
-
Myashi wrote: Hi Insomnia,
I saw you're importing lots of shaders
You've already ported reinhard linear, i was wandering if there's any chance you can port even the Marty's Reinhard.
It is one of the last i miss. It would be much appreciated
Ported it a few weeks ago so sorry for not posting it here.
/*
Original shader by Marty McFly
Amateur port by Insomnia
*/
uniform float ReinhardWhitepoint <
ui_type = "drag";
ui_min = 0.0; ui_max = 10.0;
ui_tooltip = "how steep the color curve is at linear point";
> = 1.250;
uniform float ReinhardScale <
ui_type = "drag";
ui_min = 0.0; ui_max = 3.0;
ui_tooltip = "how steep the color curve is at linear point";
> = 0.50;
#include "ReShade.fxh"
float3 ReinhardPass(float4 position : SV_Position, float2 texcoord : TexCoord) : SV_Target
{
float3 x = tex2D(ReShade::BackBuffer, texcoord).rgb;
const float W = ReinhardWhitepoint; // Linear White Point Value
const float K = ReinhardScale; // Scale
// gamma space or not?
return (1 + K * x / (W * W)) * x / (x + K);
}
technique Reinhard
{
pass
{
VertexShader = PostProcessVS;
PixelShader = ReinhardPass;
}
}
Myashi wrote: To everyone else: I've been busy on Mafia 3 so i didn't follow the forum lately. Anyone can tell me if Spherical Tonemap have been ported?
I took the liberty of porting that too if you don't mind, but I'm unsure if it works as it should... It just brightens the image.
/*
Coded by Gilcher Pascal aka Marty McFly
Amateur port by Insomnia
*/
uniform float sphericalAmount <
ui_type = "drag";
ui_min = 0.00; ui_max = 2.00;
ui_label = "Spherical amount";
ui_tooltip = "Amount of spherical tonemapping applied...sort of";
> = 1.0;
#include "ReShade.fxh"
float3 SphericalPass(float4 position : SV_Position, float2 texcoord : TexCoord) : SV_Target
{
float3 color = tex2D(ReShade::BackBuffer, texcoord).rgb;
float3 signedColor = color.rgb * 2.0 - 1.0;
float3 sphericalColor = sqrt(1.0 - signedColor.rgb * signedColor.rgb);
sphericalColor = sphericalColor * 0.5 + 0.5;
sphericalColor *= color.rgb;
color.rgb += sphericalColor.rgb * sphericalAmount;
color.rgb *= 0.95;
return color.rgb;
}
technique SphericalTonemap
{
pass
{
VertexShader = PostProcessVS;
PixelShader = SphericalPass;
}
}
- Insomnia
-
- Myashi
-
Insomnia wrote:
Myashi wrote: Hi Insomnia,
I saw you're importing lots of shaders
You've already ported reinhard linear, i was wandering if there's any chance you can port even the Marty's Reinhard.
It is one of the last i miss. It would be much appreciated
Ported it a few weeks ago so sorry for not posting it here.
/* Original shader by Marty McFly Amateur port by Insomnia */ uniform float ReinhardWhitepoint < ui_type = "drag"; ui_min = 0.0; ui_max = 10.0; ui_tooltip = "how steep the color curve is at linear point"; > = 1.250; uniform float ReinhardScale < ui_type = "drag"; ui_min = 0.0; ui_max = 3.0; ui_tooltip = "how steep the color curve is at linear point"; > = 0.50; #include "ReShade.fxh" float3 ReinhardPass(float4 position : SV_Position, float2 texcoord : TexCoord) : SV_Target { float3 x = tex2D(ReShade::BackBuffer, texcoord).rgb; const float W = ReinhardWhitepoint; // Linear White Point Value const float K = ReinhardScale; // Scale // gamma space or not? return (1 + K * x / (W * W)) * x / (x + K); } technique Reinhard { pass { VertexShader = PostProcessVS; PixelShader = ReinhardPass; } }Myashi wrote: To everyone else: I've been busy on Mafia 3 so i didn't follow the forum lately. Anyone can tell me if Spherical Tonemap have been ported?
I took the liberty of porting that too if you don't mind, but I'm unsure if it works as it should... It just brightens the image.
/* Coded by Gilcher Pascal aka Marty McFly Amateur port by Insomnia */ uniform float sphericalAmount < ui_type = "drag"; ui_min = 0.00; ui_max = 2.00; ui_label = "Spherical amount"; ui_tooltip = "Amount of spherical tonemapping applied...sort of"; > = 1.0; #include "ReShade.fxh" float3 SphericalPass(float4 position : SV_Position, float2 texcoord : TexCoord) : SV_Target { float3 color = tex2D(ReShade::BackBuffer, texcoord).rgb; float3 signedColor = color.rgb * 2.0 - 1.0; float3 sphericalColor = sqrt(1.0 - signedColor.rgb * signedColor.rgb); sphericalColor = sphericalColor * 0.5 + 0.5; sphericalColor *= color.rgb; color.rgb += sphericalColor.rgb * sphericalAmount; color.rgb *= 0.95; return color.rgb; } technique SphericalTonemap { pass { VertexShader = PostProcessVS; PixelShader = SphericalPass; } }
Thank you Insomnia.
I'll test Spherical Tonemap
![:) :)](/media/kunena/emoticons/smile.png)
- TreppenBananenHutstaender
-
![:lol: :lol:](/media/kunena/emoticons/grin.png)
/**
* Watch_Dogs Tonemap
* Original by Marty McFly
* Amateur port by TreppenBananenHutstaender
*/
#include "ReShade.fxh"
float3 WatchDogsToneMapPass(float4 position : SV_Position, float2 texcoord : TexCoord) : SV_Target
{
float3 x = tex2D(ReShade::BackBuffer, texcoord).rgb;
const float3 A = float3(0.55f, 0.50f, 0.45f); // Shoulder strength
const float3 B = float3(0.30f, 0.27f, 0.22f); // Linear strength
const float3 C = float3(0.10f, 0.10f, 0.10f); // Linear angle
const float3 D = float3(0.10f, 0.07f, 0.03f); // Toe strength
const float3 E = float3(0.01f, 0.01f, 0.01f); // Toe Numerator
const float3 F = float3(0.30f, 0.30f, 0.30f); // Toe Denominator
const float3 W = float3(2.80f, 2.90f, 3.10f); // Linear White Point Value
const float3 F_linearWhite = ((W*(A*W+C*B)+D*E)/(W*(A*W+B)+D*F))-(E/F);
float3 F_linearColor = ((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-(E/F);
// gamma space or not?
return pow(saturate(F_linearColor * 1.25 / F_linearWhite),1.25);
}
technique WatchDogsTonemap
{
pass
{
VertexShader = PostProcessVS;
PixelShader = WatchDogsToneMapPass;
}
}
- F D B
-
Need it badly!
Thanks
- Gar Stazi
-
- Martigen
-
![:) :)](/media/kunena/emoticons/smile.png)
And my request -- it's been overlooked because we already have it, but we don't -- er, let me explain:
SMAA
The one we have is a port of the original, not Ceejay's modified one that included slight performance enhancements and the addition of depth-edge detection, which can be combined with color to basically get the best possible result you can get with shader-based AA.
So, could some kind genius port (and replace) Ceejay's SMAA in the Reshade archive on GitHub? Note it will need to respect the new depth pre-processor flag RESHADE_DEPTH_LINEARIZATION_FAR_PLANE=.
Edit: Or maybe, if it's better, add it as 'Ceejay_SMAA' so there's both in there.
FXAA
This chap is asking for a similar thing re FXAA: reshade.me/forum/suggestions/2723-can-we-get-a-better-fxaa
I haven't investigated much, but I do know the current FXAA needs #define FXAA_QUALITY__PRESET 39 to ensure maximum quality, whereas the one in the old SweetFX package ranged from 1-9. No idea why the quality presets are different, but browsing the code for both there are differences -- which is the latest/bestest version?
As these are both pivotal shaders it would be good to ensure we have the best versions thereof in Reshade.
Thank you in advance! May your Christmas be laden with booze, sex, and Santa! But not sex with Santa. Unless you want to, that is. Not judging. NOT JUDGING.
- F D B
-
- crosire
-
Topic Author
- Insomnia
-
This is the Color filter shader by Ioxa that I've tried porting to ReShade 3.x with all GUI annotations, but I'm stuck at the "mode switches". ReShade tells me I'm redefining stuff that sits in if statements. So I give up.
![:P :P](/media/kunena/emoticons/tongue.png)
Here's the half-finished shader. Note that some settings are only available in the shader itself because I don't really know how to add them to the GUI.
/*
Color Filter v0.6 for ReShade
Coded by Ioxa
Amateur (unfinished) port by Insomnia
*/
//************************************************************
//---------------------Global Settings------------------------
//************************************************************
uniform float FilterStrength <
ui_type = "drag";
ui_min = -0.50; ui_max = 1.0;
ui_tooltip = "Strength of the filter. Positive values add color, negative values remove color.";
> = 0.5;
uniform float FilterExposure <
ui_type = "drag";
ui_min = 0.0; ui_max = 2.0;
ui_tooltip = "-#'s > 1.00 = darker, #'s < 1 = brighter. This will have an effect even if all filters are disabled.";
> = 0.5;
uniform float AdjustSaturation <
ui_type = "drag";
ui_min = 0.0; ui_max = 2.0;
ui_tooltip = "Amount of color from the original in the final image. 0.00 = black and white, values greater than 1.00 add more color. This will not change the saturation of the color filters, only the original image.";
> = 0.5;
uniform float AdjustShadows <
ui_type = "drag";
ui_min = -1.0; ui_max = 1.0;
ui_tooltip = "A quick way to adjust shadows if a color filter has made them brighter or darker than you would like them to be. Values greater than 0.00 will make shadows brighter, values less than 0.00 will make them darker.";
> = 0.0;
/*
uniform bool ViewFilterEnable <
> = false;
*/
//#define FilterStrength 0.10 //[-0.10:1.00] //-Strength of the filter. Positive values add color, negative values remove color.
#define FilterBlendMode 2 //[0:5] //-0 = Overlay, 1 = Multiply, 2 = Soft Light, 3 = Linear Light, 4 = Burn and Dodge, 5 = Screen
//#define FilterExposure 1.00 //[0.00:2.00] //-#'s > 1.00 = darker, #'s < 1 = brighter. This will have an effect even if all filters are disabled.
//#define AdjustSaturation 0.97 //[0.00:2.00] //-Amount of color from the original in the final image. 0.00 = black and white, values greater than 1.00 add more color. This will not change the saturation of the color filters, only the original image.
//#define AdjustShadows -0.00 //[-1.00:1.00] //-A quick way to adjust shadows if a color filter has made them brighter or darker than you would like them to be. Values greater than 0.00 will make shadows brighter, values less than 0.00 will make them darker.
//#define DitherFilter 1 //[0:1] //-Iestyn's RGB dither (Valve). Reduces color banding that may be introduced by the color filter.
//#define ViewFilter 0 //[0:1] //-Set to 1 to view the color filter. Helpful for selecting and adjusting colors.
//************************************************************
//---------------------Color Selection------------------------
//************************************************************
uniform int BrightColorSelection2 <
ui_type = "combo";
ui_tooltip = "Color applied to bright areas.";
ui_items = "Off-White\0Light-Yellow\0Yellow\0Orange\0Red\0Blue Violet\0Blue\0Cyan\0Green\0Brown\0";
> = 2;
uniform int DarkColorSelection2 <
ui_type = "combo";
ui_tooltip = "Color applied to dark areas.";
ui_items = "Blue\0Purple\0Red\0Orange\0Green\0Olive\0Brown\0Dark Cyan\0Dark Yellow\0Grey\0";
> = 1;
#define BrightColorSelection 2 //[0:10] //-Color applied to bright areas. 0 = Custom, 1 = Off-White, 2 = Light-Yellow, 3 = Yellow, 4 = Orange, 5 = Red, 6 = Blue Violet, 7 = Blue, 8 = Cyan, 9 = Green, 10 = Brown
#define DarkColorSelection 1 //[0:10] //-Color applied to dark areas. 0 = Custom, 1 = Blue, 2 = Purple, 3 = Red, 4 = Orange, 5 = Green, 6 = Olive, 7 = Brown, 8 = Dark Cyan, 9 = Dark Yellow, 10 = Grey
#define BrightColorRed 255 //[0:255] //-Amount of RED in the color applied to bright areas.
#define BrightColorGreen 200 //[0:255] //-Amount of GREEN in the color applied to bright areas.
#define BrightColorBlue 153 //[0:255] //-Amount of BLUE in the color applied to bright areas.
#define DarkColorRed 100 //[0:255] //-Amount of RED in the color applied to dark areas.
#define DarkColorGreen 50 //[0:255] //-Amount of GREEN in the color applied to dark areas.
#define DarkColorBlue 250 //[0:255] //-Amount of BLUE in the color applied to dark areas.
//************************************************************
//--------------------Filter Adjustments----------------------
//************************************************************
uniform float BrightColorAmt <
ui_type = "drag";
ui_min = 0.0; ui_max = 0.50;
ui_label = "Bright color in filter";
ui_tooltip = "Amount of the bright color in the filter. Setting too high will cause banding.";
> = 0.0;
uniform float DarkColorAmt <
ui_type = "drag";
ui_min = 0.0; ui_max = 0.50;
ui_label = "Dark color in filter";
ui_tooltip = "Amount of the dark color in the filter. Setting too high will cause banding.";
> = 0.0;
uniform float HighPower <
ui_type = "drag";
ui_min = 0.0; ui_max = 1.0;
ui_label = "High Power";
ui_tooltip = "Raising this will make the color in bright areas brighter.";
> = 0.3;
uniform float LowPower <
ui_type = "drag";
ui_min = 0.0; ui_max = 1.0;
ui_label = "Low Power";
ui_tooltip = "Raising this will make the color in dark areas darker.";
> = 1.0;
//************************************************************
//-----------------Filter Color Adjustments-------------------
//************************************************************
uniform float BrightRed <
ui_type = "drag";
ui_min = 0.0; ui_max = 2.0;
ui_tooltip = "Adjust the amount of RED in BRIGHT areas of the color filter. It is helpful to set ViewFilter to 1 when adjusting. # > 1.00 ADD color, # < 1.00 REMOVE color.";
> = 0.20;
uniform float BrightGreen <
ui_type = "drag";
ui_min = 0.0; ui_max = 2.0;
ui_tooltip = "Adjust the amount of Green in BRIGHT areas of the color filter. It is helpful to set ViewFilter to 1 when adjusting. # > 1.00 ADD color, # < 1.00 REMOVE color.";
> = 0.20;
uniform float BrightBlue <
ui_type = "drag";
ui_min = 0.0; ui_max = 2.0;
ui_tooltip = "Adjust the amount of BLUE in BRIGHT areas of the color filter. It is helpful to set ViewFilter to 1 when adjusting. # > 1.00 ADD color, # < 1.00 REMOVE color.";
> = 0.20;
uniform float MidRed <
ui_type = "drag";
ui_min = 0.0; ui_max = 2.0;
ui_tooltip = "Adjust the amount of RED in BRIGHT areas of the color filter. It is helpful to set ViewFilter to 1 when adjusting. # > 1.00 ADD color, # < 1.00 REMOVE color.";
> = 0.20;
uniform float MidGreen <
ui_type = "drag";
ui_min = 0.0; ui_max = 2.0;
ui_tooltip = "Adjust the amount of GREEN in BRIGHT areas of the color filter. It is helpful to set ViewFilter to 1 when adjusting. # > 1.00 ADD color, # < 1.00 REMOVE color.";
> = 0.20;
uniform float MidBlue <
ui_type = "drag";
ui_min = 0.0; ui_max = 2.0;
ui_tooltip = "Adjust the amount of BLUE in BRIGHT areas of the color filter. It is helpful to set ViewFilter to 1 when adjusting. # > 1.00 ADD color, # < 1.00 REMOVE color.";
> = 0.20;
uniform float DarkRed <
ui_type = "drag";
ui_min = 0.0; ui_max = 2.0;
ui_tooltip = "Adjust the amount of RED in BRIGHT areas of the color filter. It is helpful to set ViewFilter to 1 when adjusting. # > 1.00 ADD color, # < 1.00 REMOVE color.";
> = 0.20;
uniform float DarkGreen <
ui_type = "drag";
ui_min = 0.0; ui_max = 2.0;
ui_tooltip = "Adjust the amount of GREEN in BRIGHT areas of the color filter. It is helpful to set ViewFilter to 1 when adjusting. # > 1.00 ADD color, # < 1.00 REMOVE color.";
> = 0.20;
uniform float DarkBlue <
ui_type = "drag";
ui_min = 0.0; ui_max = 2.0;
ui_tooltip = "Adjust the amount of BLUE in BRIGHT areas of the color filter. It is helpful to set ViewFilter to 1 when adjusting. # > 1.00 ADD color, # < 1.00 REMOVE color.";
> = 0.20;
#include "ReShade.fxh"
#define CoefLuma_F float3(0.333,0.333,0.333)
float3 IoxaFilterTech(float4 position : SV_Position, float2 texcoord : TexCoord) : SV_Target
{
float3 color = tex2D(ReShade::BackBuffer, texcoord).rgb;
float3 filter = color.rgb;
//float luma = dot(filter.rgb,CoefLuma_F);
float luma = 0.5*(max(filter.r,max(filter.g,filter.b)) + min(filter.r,min(filter.g,filter.b)));
//float3 color = filter.rgb;
float3 A = 0.0;
float3 B = filter.rgb;
if (AdjustSaturation != 1.00)
filter.rgb = lerp(dot(filter.rgb,CoefLuma_F),filter.rgb,AdjustSaturation);
/*
if (CurveRed != 1.00)
filter.r = pow(abs(filter.r),CurveRed);
if (CurveGreen != 1.00)
filter.g = pow(abs(filter.g),CurveGreen);
if (CurveBlue != 1.00)
filter.b = pow(abs(filter.b),CurveBlue);
*/
//color = filter.rgb;
A = 0.0;
B = filter.rgb;
#if DarkColorSelection == 1 //blue
#define DarkColor float3(36.0/255.0,24.0/255.0,130.0/255.0)
#elif DarkColorSelection == 2 //purple
#define DarkColor float3(85.0/255.0,26.0/255.0,139.0/255.0)
#elif DarkColorSelection == 3 //red
#define DarkColor float3(139.0/255.0,35.0/255.0,35.0/255.0)
#elif DarkColorSelection == 4 //orange
#define DarkColor float3(205.0/255.0,102.0/255.0,5.0/255.0)
#elif DarkColorSelection == 5 //green
#define DarkColor float3(47.0/255.0,79.0/255.0,47.0/255.0)
#elif DarkColorSelection == 6 //olive
#define DarkColor float3(107.0/255.0,142.0/255.0,35.0/255.0)
#elif DarkColorSelection == 7 //brown
#define DarkColor float3(92.0/255.0,64.0/255.0,51.0/255.0)
#elif DarkColorSelection == 8 //dark cyan
#define DarkColor float3(47.0/255.0,79.0/255.0,79.0/255.0)
#elif DarkColorSelection == 9 //dark yellow
#define DarkColor float3(139.0/255.0,101.0/255.0,8.0/255.0)
#elif DarkColorSelection == 10 //grey
#define DarkColor float3(64.0/255.0,64.0/255.0,64.0/255.0)
#else
#define DarkColor float3(DarkColorRed.0/255.0,DarkColorGreen.0/255.0,DarkColorBlue.0/255.0)
#endif
/*
if (BrightColorSelection == 1) //off-white
#define BrightColor float3(205.0/255.0,186.0/255.0,150.0/255.0)
else if (BrightColorSelection == 2) //light yellow
#define BrightColor float3(1.0,1.0,0.50)
else if (BrightColorSelection == 3) //yellow
#define BrightColor float3(255.0/255.0,193.0/255.0,37.0/255.0)
else if (BrightColorSelection == 4) //orange
#define BrightColor float3(255.0/255.0,127.0/255.0,0.0/255.0)
else if (BrightColorSelection == 5) //red
#define BrightColor float3(255.0/255.0,36.0/255.0,0.0/255.0)
else if (BrightColorSelection == 6) //blue violet
#define BrightColor float3(138.0/255.0,43.0/255.0,226.0/255.0)
else if (BrightColorSelection == 7) //blue
#define BrightColor float3(65.0/255.0,86.0/255.0,197.0/255.0)
else if (BrightColorSelection == 8) //cyan
#define BrightColor float3(72.0/209.0,204.0/255.0,255.0/255.0)
else if (BrightColorSelection == 9) //green
#define BrightColor float3(35.0/255.0,142.0/255.0,35.0/255.0)
else if (BrightColorSelection == 10) //brown
#define BrightColor float3(139.0/255.0,115.0/255.0,85.0/255.0)
else if (BrightColorSelection == 0)
#define BrightColor float3(BrightColorRed.0/255.0,BrightColorGreen.0/255.0,BrightColorBlue.0/255.0)
*/
#if BrightColorSelection == 1 //off-white
#define BrightColor float3(205.0/255.0,186.0/255.0,150.0/255.0)
#elif BrightColorSelection == 2 //light yellow
#define BrightColor float3(1.0,1.0,0.50)
#elif BrightColorSelection == 3 //yellow
#define BrightColor float3(255.0/255.0,193.0/255.0,37.0/255.0)
#elif BrightColorSelection == 4 //orange
#define BrightColor float3(255.0/255.0,127.0/255.0,0.0/255.0)
#elif BrightColorSelection == 5 //red
#define BrightColor float3(255.0/255.0,36.0/255.0,0.0/255.0)
#elif BrightColorSelection == 6 //blue violet
#define BrightColor float3(138.0/255.0,43.0/255.0,226.0/255.0)
#elif BrightColorSelection == 7 //blue
#define BrightColor float3(65.0/255.0,86.0/255.0,197.0/255.0)
#elif BrightColorSelection == 8 //cyan
#define BrightColor float3(72.0/209.0,204.0/255.0,255.0/255.0)
#elif BrightColorSelection == 9 //green
#define BrightColor float3(35.0/255.0,142.0/255.0,35.0/255.0)
#elif BrightColorSelection == 10 //brown
#define BrightColor float3(139.0/255.0,115.0/255.0,85.0/255.0)
#else
#define BrightColor float3(BrightColorRed.0/255.0,BrightColorGreen.0/255.0,BrightColorBlue.0/255.0)
#endif
#define DarkCutoff DarkColorAmt
#define BrightCutoff 1.00-BrightColorAmt+0.001
float3 C = saturate(lerp(0,1,smoothstep(0.0,1.0,luma)));
A = saturate(lerp(saturate(DarkColor),saturate(BrightColor),smoothstep(DarkCutoff,BrightCutoff,C)));
//Additional filter color adjustments
//float3 Alow = pow(A,1.0001+LowPower);
float3 Alow = A+float3(DarkRed,DarkGreen,DarkBlue);
Alow = pow(Alow,1.0001+LowPower);
Alow = saturate(Alow);
float3 Ahigh = pow(A,1.0001-HighPower);
//float3 Ahigh = A+float3(BrightRed,BrightGreen,BrightBlue);
Ahigh += float3(BrightRed,BrightGreen,BrightBlue);
//Ahigh = pow(Ahigh,1.0001-HighPower);
Ahigh = saturate(Ahigh);
A += float3(MidRed,MidGreen,MidBlue);
Alow = lerp(Alow,A,smoothstep(0.0,0.3333,luma)); //0.1960784
Ahigh = lerp(A,Ahigh,smoothstep(0.6666,1.0,luma)); //0.80392157
//A = lerp(Alow,Ahigh,0.50);
A = lerp(Alow,Ahigh,smoothstep(0.1960784,0.80392157,luma));
A = saturate(A);
#if ViewFilter == 1
filter.rgb = A;
//color.rgb = A;
#else
#if FilterBlendMode == 1
//multiply
A = 2*B*A;
#elif FilterBlendMode == 2
//softlight
A = lerp((2*B-1)*(A-pow(A,2))+A, (2*B-1)*(pow(A,0.5)-A)+A,step(0.501,luma));
//A = lerp((2*A-1)*(B-pow(B,2))+B, (2*A-1)*(pow(B,0.5)-B)+B,step(0.501,luma));
#elif FilterBlendMode == 3
//linear light
A = B+2*A-1;
#elif FilterBlendMode == 4
//Burn and Dodge
A = lerp(A+B-1,A+B,smoothstep(0.0,1.0,luma));
//A = saturate(A);
#elif FilterBlendMode == 5
//screen
A = 1.0 - (2*(1.0-B)*(1.0-A));
//A + 1-(1-B)*(1-A);
#elif FilterBlendMode == 6
//darken only
A = min(A,color.rgb);
#elif FilterBlendMode == 7
//Burn and Dodge
//A = 0.5-2*(B-0.5)*(A-0.5);
A = lerp(A+B-1,A+B,smoothstep(0.0,1.0,luma));
#elif FilterBlendMode == 8
//linear light
A = B+2*A-1;
#elif FilterBlendMode == 9
A = lerp(float3(0.0,0.0,0.0),float3(1.0,1.0,1.0),smoothstep(A>1-B,A<1-B,luma));
#else
//overlay
A = lerp(2*B*A, 1.0 - 2*(1.0-B)*(1.0-A), step(0.5,luma));
#endif
filter.rgb = lerp(filter.rgb,A,FilterStrength);
#endif
#if ViewFilter == 1
if (FilterExposure != 1.00)
filter.rgb = saturate(pow(abs(filter.rgb),FilterExposure));
#else
if (FilterExposure != 1.00)
filter.rgb = saturate(pow(abs(filter.rgb),FilterExposure));
if (AdjustShadows != 0.00)
filter.rgb = lerp(saturate(lerp(filter.rgb,pow(abs(filter.rgb),0.75),AdjustShadows)),filter.rgb,smoothstep(0.00,0.20,luma));
#endif
/*
#if DitherFilter == 1
filter = saturate(filter);
//Found at https://www.shadertoy.com/view/MslGR8
// Iestyn's RGB dither (7 asm instructions) from Portal 2 X360, slightly modified for VR
float3 vDither = float3(dot(float2(171.0, 231.0), texcoord * ScreenSize).xxx);
vDither.rgb = frac( vDither.rgb / float3( 103.0, 71.0, 97.0 ) ) - 0.5;
filter.rgb += (vDither.rgb / 255.0);
#endif
*/
return saturate(filter).rgb;
}
technique FilterTech
{
pass G
{
VertexShader = PostProcessVS;
PixelShader = IoxaFilterTech;
}
}
Cheers
- Insomnia
-
/*
Credits :: icelaglace, a.o => (ported from some blog, author unknown)
Credits :: Pascal aka Marty McFly
Amateur port by Insomnia (with code additions by unknown ReShade forum user)
*/
uniform float fFisheyeZoom <
ui_type = "drag";
ui_min = 0.5; ui_max = 1.0;
ui_label = "Fish Eye Zoom";
ui_tooltip = "Lens zoom to hide bugged edges due to texcoord modification";
> = 0.55;
uniform float fFisheyeDistortion <
ui_type = "drag";
ui_min = -0.300; ui_max = 0.300;
ui_label = "Fisheye Distortion";
ui_tooltip = "Distortion of image";
> = 0.01;
uniform float fFisheyeDistortionCubic <
ui_type = "drag";
ui_min = -0.300; ui_max = 0.300;
ui_label = "Fisheye Distortion Cubic";
ui_tooltip = "Distortion of image, cube based";
> = 0.7;
uniform float fFisheyeColorshift <
ui_type = "drag";
ui_min = -0.10; ui_max = 0.10;
ui_label = "Colorshift";
ui_tooltip = "Amount of color shifting";
> = 0.050;
#include "ReShade.fxh"
float3 FISHEYE_CAPass(float4 position : SV_Position, float2 texcoord : TexCoord) : SV_Target
{
float3 color = tex2D(ReShade::BackBuffer, texcoord).rgb;
float4 coord=0.0;
coord.xy=texcoord.xy;
coord.w=0.0;
color.rgb = 0.0;
float3 eta = float3(1.0+fFisheyeColorshift*0.9,1.0+fFisheyeColorshift*0.6,1.0+fFisheyeColorshift*0.3);
float2 center;
center.x = coord.x-0.5;
center.y = coord.y-0.5;
float LensZoom = 1.0/fFisheyeZoom;
float r2 = (texcoord.x-0.5) * (texcoord.x-0.5);// + (texcoord.y-0.5) * (texcoord.y-0.5);
float f = 0;
if( fFisheyeDistortionCubic == 0.0){
f = 1 + r2 * fFisheyeDistortion;
}else{
f = 1 + r2 * (fFisheyeDistortion + fFisheyeDistortionCubic * sqrt(r2));
};
float x = f*LensZoom*(coord.x-0.5)+0.5;
float y = f*LensZoom*(coord.y-0.5)+0.5;
float2 rCoords = (f*eta.r)*LensZoom*(center.xy*0.5)+0.5;
float2 gCoords = (f*eta.g)*LensZoom*(center.xy*0.5)+0.5;
float2 bCoords = (f*eta.b)*LensZoom*(center.xy*0.5)+0.5;
color.x = tex2D(ReShade::BackBuffer,rCoords).r;
color.y = tex2D(ReShade::BackBuffer,gCoords).g;
color.z = tex2D(ReShade::BackBuffer,bCoords).b;
return color.rgb;
}
technique FISHEYE_CA
{
pass
{
VertexShader = PostProcessVS;
PixelShader = FISHEYE_CAPass;
}
}
- OJshe
-
- Exilium
-
Emboss
Latest version of MXAO
Matso depht of field with light bright controll
Lens Flares
I don't know, but my LUT of ReShade Framework not work in 3.x.x, make my image be red.
And Marty, I'm making a combination of RBM and Emboss to give a bumpmap effect in games with no normalmap or specularmaps, You can work in a shader to do that? Someone did it to GTA SA.
- hunt1hunt
-
- XIIICaesar
-
- magicart87
-
- Aces
-
Please forgive me if this has already been done and I've missed it but could some kind soul please port over Ganossa's excellent "Magnify" shader from V2 to V3.
Many thanks and kind regards
Aces