Requests for effect ports to ReShade 3.0
- XIIICaesar
Less
More
7 years 9 months ago - 7 years 9 months ago #61
by XIIICaesar
Replied by XIIICaesar on topic Requests for effect ports to ReShade 3.0
Just thought I'd upload this little gem here before watching some Z Nation with a pizza. Took a couple hours to get it working right. Or @ least it seems to be working correctly to me.... CeeJay's Bloom from SweetFX. I ported the shader from ReShade 2.0.3.1f.
// Amateur port of CeeJay's SweetFX Bloom by XIIICaesar
uniform float BloomThreshold <
ui_type = "drag";
ui_min = 0.00; ui_max = 50.00;
ui_tooltip = "Threshold for what is a bright light (that causes bloom) and what isn't.";
> = 20.25;
uniform float BloomPower <
ui_type = "drag";
ui_min = 0.000; ui_max = 8.000;
ui_tooltip = "Strength of the bloom.";
> = 1.446;
uniform float BloomWidth <
ui_type = "drag";
ui_min = 0.0000; ui_max = 1.0000;
ui_tooltip = "Width of the bloom.";
> = 0.0142;
#include "ReShade.fxh"
float4 BloomPass( float4 ColorInput2,float2 Tex )
{
float3 BlurColor2 = 0;
float3 Blurtemp = 0;
//float MaxDistance = sqrt(8*BloomWidth);
float MaxDistance = 8*BloomWidth; //removed sqrt
float CurDistance = 0;
//float Samplecount = 0;
float Samplecount = 25.0;
float2 blurtempvalue = Tex * ReShade::PixelSize * BloomWidth;
//float distancetemp = 1.0 - ((MaxDistance - CurDistance) / MaxDistance);
float2 BloomSample = float2(2.5,-2.5);
float2 BloomSampleValue;// = BloomSample;
for(BloomSample.x = (2.5); BloomSample.x > -2.0; BloomSample.x = BloomSample.x - 1.0) // runs 5 times
{
BloomSampleValue.x = BloomSample.x * blurtempvalue.x;
float2 distancetemp = BloomSample.x * BloomSample.x * BloomWidth;
for(BloomSample.y = (- 2.5); BloomSample.y < 2.0; BloomSample.y = BloomSample.y + 1.0) // runs 5 ( * 5) times
{
distancetemp.y = BloomSample.y * BloomSample.y;
//CurDistance = sqrt(dot(BloomSample,BloomSample)*BloomWidth); //dot() attempt - same result , same speed. //move x part up ?
//CurDistance = sqrt( (distancetemp.y * BloomWidth) + distancetemp.x); //dot() attempt - same result , same speed. //move x part up ?
CurDistance = (distancetemp.y * BloomWidth) + distancetemp.x; //removed sqrt
//Blurtemp.rgb = tex2D(ReShade::BackBuffer, float2(Tex + (BloomSample*blurtempvalue))); //same result - same speed.
BloomSampleValue.y = BloomSample.y * blurtempvalue.y;
Blurtemp.rgb = tex2D(ReShade::BackBuffer, float2(Tex + BloomSampleValue)).rgb; //same result - same speed.
//BlurColor2.rgb += lerp(Blurtemp.rgb,ColorInput2.rgb, 1 - ((MaxDistance - CurDistance)/MaxDistance)); //convert float4 to float3 and check if it's possible to use a MAD
//BlurColor2.rgb += lerp(Blurtemp.rgb,ColorInput2.rgb, 1.0 - ((MaxDistance - CurDistance) / MaxDistance)); //convert float4 to float3 and check if it's possible to use a MAD
BlurColor2.rgb += lerp(Blurtemp.rgb,ColorInput2.rgb, sqrt(CurDistance / MaxDistance)); //reduced number of sqrts needed
//Samplecount = Samplecount + 1; //take out of loop and replace with constant if it helps (check with compiler)
}
}
BlurColor2.rgb = (BlurColor2.rgb / (Samplecount - (BloomPower - BloomThreshold*5))); //check if using MAD
float Bloomamount = (dot(ColorInput2.rgb,float3(0.299f, 0.587f, 0.114f))) ; //try BT 709
float3 BlurColor = BlurColor2.rgb * (BloomPower + 4.0); //check if calculated offline and combine with line 24 (the blurcolor2 calculation)
ColorInput2.rgb = lerp(ColorInput2.rgb,BlurColor.rgb, Bloomamount);
return saturate(ColorInput2);
}
float3 BloomWrap(float4 position : SV_Position, float2 texcoord : TEXCOORD0) : SV_Target
{
float4 color = tex2D(ReShade::BackBuffer, texcoord);
color = BloomPass(color,texcoord);
return color.rgb;
}
technique CeeJayBloom
{
pass
{
VertexShader = PostProcessVS;
PixelShader = BloomWrap;
}
}
Last edit: 7 years 9 months ago by XIIICaesar. Reason: Forgot code brackets
The following user(s) said Thank You: Aces
The topic has been locked.
- Insomnia
Less
More
7 years 9 months ago - 7 years 9 months ago #62
by Insomnia
Replied by Insomnia on topic Requests for effect ports to ReShade 3.0
I've been doing some slight changes to Martys old CA lens distortion shaders and thought I'd share it here.
Now, there's one horizontal distortion shader that resembles the one found in Resident Evil 7 and P.T demo (see screenshot), and one vertical distortion shader that works more like barrel distortion.
I recommend loading these shaders before any sharpening as the distortion makes center pixels slightly blurred.
Horizontal version:
Vertical:
Now, there's one horizontal distortion shader that resembles the one found in Resident Evil 7 and P.T demo (see screenshot), and one vertical distortion shader that works more like barrel distortion.
I recommend loading these shaders before any sharpening as the distortion makes center pixels slightly blurred.
Horizontal version:
Warning: Spoiler!
[image]
c1.staticflickr.com/3/2823/32950700481_0a17d3f5a8_h.jpg
[/image]
Notice how each side are slightly curved.
Notice how each side are slightly curved.
/*
Credits :: icelaglace, a.o => (ported from some blog, author unknown)
Credits :: Pascal aka Marty McFly
Amateur port by Insomnia
*/
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.515;
uniform float fFisheyeDistortion <
ui_type = "drag";
ui_min = -0.300; ui_max = 0.300;
ui_label = "Fisheye Distortion";
ui_tooltip = "Distortion of image";
> = 0.036;
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.102;
uniform float fFisheyeColorshift <
ui_type = "drag";
ui_min = -0.10; ui_max = 0.10;
ui_label = "Colorshift";
ui_tooltip = "Amount of color shifting";
> = 0.000;
#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.y-0.5) * (texcoord.y-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_HORIZONTAL
{
pass
{
VertexShader = PostProcessVS;
PixelShader = FISHEYE_CAPass;
}
}
Vertical:
Warning: Spoiler!
/*
Credits :: icelaglace, a.o => (ported from some blog, author unknown)
Credits :: Pascal aka Marty McFly
Amateur port by Insomnia
*/
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.535;
uniform float fFisheyeDistortion <
ui_type = "drag";
ui_min = -0.300; ui_max = 0.300;
ui_label = "Fisheye Distortion";
ui_tooltip = "Distortion of image";
> = 0.12;
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.300;
uniform float fFisheyeColorshift <
ui_type = "drag";
ui_min = -0.10; ui_max = 0.10;
ui_label = "Colorshift";
ui_tooltip = "Amount of color shifting";
> = 0.000;
#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_VERTICAL
{
pass
{
VertexShader = PostProcessVS;
PixelShader = FISHEYE_CAPass;
}
}
Last edit: 7 years 9 months ago by Insomnia.
The following user(s) said Thank You: XIIICaesar
The topic has been locked.
- Biscuit
Less
More
7 years 9 months ago - 7 years 9 months ago #63
by Biscuit
Replied by Biscuit on topic Requests for effect ports to ReShade 3.0
Thanks for the ports Insomnia, much appreciated!
Any news on a TuningPalette shader?
Any news on a TuningPalette shader?
Last edit: 7 years 9 months ago by Biscuit.
The topic has been locked.
- XIIICaesar
Less
More
7 years 9 months ago - 7 years 9 months ago #64
by XIIICaesar
Replied by XIIICaesar on topic Requests for effect ports to ReShade 3.0
Insomnia wrote: I've been doing some slight changes to Martys old CA lens distortion shaders and thought I'd share it here.
Now, there's one horizontal distortion shader that resembles the one found in Resident Evil 7 and P.T demo (see screenshot), and one vertical distortion shader that works more like barrel distortion.
I recommend loading these shaders before any sharpening as the distortion makes center pixels slightly blurred.
[/spoiler]
Dude that looks awesome. Also, is that the actual game RE7? I gotta get that game if so.
I think TuningPalette would be a vast improvement over LUT because of the light dependent function it offers with Amount TileZ. I tried putting it over but kept getting errors. I'm not as good as a lot of ya'll at writing shaders lol
Last edit: 7 years 9 months ago by XIIICaesar.
The topic has been locked.
- Insomnia
Less
More
7 years 9 months ago #65
by Insomnia
Replied by Insomnia on topic Requests for effect ports to ReShade 3.0
XIIICaesar wrote: Also, is that the actual game RE7?
No, that's Everybody's Gone to the Rapture, with the horizontal distortion enabled.
The topic has been locked.
- XIIICaesar
Less
More
7 years 9 months ago #66
by XIIICaesar
Replied by XIIICaesar on topic Requests for effect ports to ReShade 3.0
Ahhh okay. My roommate bought that game. It has great visuals but that's about it.
The topic has been locked.
- hunt1hunt
Less
More
7 years 9 months ago #67
by hunt1hunt
Replied by hunt1hunt on topic Requests for effect ports to ReShade 3.0
hellow crosire:
New effect: Adaptive fog
reshade.me/forum/shader-presentation/198...-effect-adaptive-fog
very very like it,if anyone can updata to reshade 3.0.6? thanks
New effect: Adaptive fog
reshade.me/forum/shader-presentation/198...-effect-adaptive-fog
very very like it,if anyone can updata to reshade 3.0.6? thanks
The topic has been locked.
- Marty
Less
More
7 years 9 months ago - 7 years 9 months ago #68
by Marty
Replied by Marty on topic Requests for effect ports to ReShade 3.0
Could someone port this one - Sonic Ether's ReinAway. It's made for Fallout 4 to solve its overblown brightness by removing tone mapping. It looks simple.
This is the link to the 'mod'
Warning: Spoiler!
/*
.
/ Custom /
'
*/
/*
Removes tonemapping by running the color buffer through the inverse function of the reinhard tonemapping operator
*/
float3 CustomPass(float4 position : SV_Position, float2 texcoord : TEXCOORD0) : SV_Target
{
float3 colorInput = tex2Dlod(s0, float4(texcoord, 0, 2)).rgb;
const float scale = 0.8;
float3 color = saturate(colorInput * scale);
color = -(color/(color - 1));
const float normalizer = -(scale/(scale - 1))
color /= normalizer;
color = pow(color, 0.6);
return saturate(color * 1.0);
}
.
/ Custom /
'
*/
/*
Removes tonemapping by running the color buffer through the inverse function of the reinhard tonemapping operator
*/
float3 CustomPass(float4 position : SV_Position, float2 texcoord : TEXCOORD0) : SV_Target
{
float3 colorInput = tex2Dlod(s0, float4(texcoord, 0, 2)).rgb;
const float scale = 0.8;
float3 color = saturate(colorInput * scale);
color = -(color/(color - 1));
const float normalizer = -(scale/(scale - 1))
color /= normalizer;
color = pow(color, 0.6);
return saturate(color * 1.0);
}
This is the link to the 'mod'
Last edit: 7 years 9 months ago by Marty. Reason: Added link
The topic has been locked.
- Ioxa
Less
More
Marty wrote: Could someone port this one - Sonic Ether's ReinAway. It's made for Fallout 4 to solve its overblown brightness by removing tone mapping. It looks simple.
Warning: Spoiler!/*
.
/ Custom /
'
*/
/*
Removes tonemapping by running the color buffer through the inverse function of the reinhard tonemapping operator
*/
float3 CustomPass(float4 position : SV_Position, float2 texcoord : TEXCOORD0) : SV_Target
{
float3 colorInput = tex2Dlod(s0, float4(texcoord, 0, 2)).rgb;
const float scale = 0.8;
float3 color = saturate(colorInput * scale);
color = -(color/(color - 1));
const float normalizer = -(scale/(scale - 1))
color /= normalizer;
color = pow(color, 0.6);
return saturate(color * 1.0);
}
This is the link to the 'mod'
Here you go.
Warning: Spoiler!
//ReinAway by SonicEther
//http://www.nexusmods.com/fallout4/mods/461/?
/*
Removes tonemapping by running the color buffer through the inverse function of the reinhard tonemapping operator
*/
uniform float scale <
ui_type = "drag";
ui_min = 0.00; ui_max = 1.00;
ui_tooltip = "";
> = 0.8;
uniform float normal <
ui_type = "drag";
ui_min = 1.00; ui_max = 10.00;
ui_tooltip = "Must be a greater value than scale.";
> = 1.0;
uniform float power <
ui_type = "drag";
ui_min = 0.00; ui_max = 2.00;
ui_tooltip = "Seems to curve the values.";
> = 0.6;
uniform float exposure <
ui_type = "drag";
ui_min = 0.00; ui_max = 10.00;
ui_tooltip = "Multiplier for the final image..";
> = 1.0;
#include "ReShade.fxh"
float3 ReinAway(in float4 pos : SV_Position, in float2 texcoord : TEXCOORD) : COLOR
{
float3 colorInput = tex2D(ReShade::BackBuffer,texcoord).rgb;
float3 color = (colorInput * scale);
color = -(color/(color - (normal)));
const float normalizer = -(scale/(scale - (normal)));
color /= normalizer;
color = pow(color, power);
return saturate(color * exposure);
}
technique ReinAway
{
pass ReinAway
{
VertexShader = PostProcessVS;
PixelShader = ReinAway;
}
}
I tested it in The Division and it kinda just made everything gray, maybe it only works well with certain games.
The following user(s) said Thank You: Marty
The topic has been locked.