Welcome, Guest.
Username: Password: Remember me

TOPIC: [WIP] "Adobe Lightroom" for ReShade

[WIP] "Adobe Lightroom" for ReShade 2 years 6 months ago #21

Marty McFly wrote:

HSV can only adjust the saturation of different hues in 3 ways each. I figured as no one really understood how these 3 ways differ, one saturation control per hue is enough. On top of that, you can now adjust the brightness and hue of those hues as well, like shifting reds more into orange, making blues brighter and so on.
You also have extensive global controls for gamma, exposure, saturation, vibrance and a tool for luma gradient. And a color picker, histogram,, LUT generator as well..
Watch the video I posted, it's shown there. What is not shown in the video because I haven't coded that at the time is a cool and intuitive new approach on vignette.

It's basically HSV, Levels, lift gamma gain, curves (with more control) and a whole lot more as well all in one and nicely working together.

I just made an inappropriate noise :side:

That sounds amazing. Thank you for the explanation.

Being able to output to a LUT will make sharing presets with others really simple, cutting down on performance overhead for them. That being said, do you have any idea what kind of hit we might take if we were to keep the lightroom shader enabled all the time (for continued editing on a shot-per-shot basis for screenshotters)? Would it be akin to using a whole bunch of previous shaders (liftgammagain, curves, hsv, tonemapping etc) or even more performance-hungry (on a par with the more taxing shaders like AO)? I know it's difficult to account for all set-ups, but I'd be interested if you had any idea.
The topic has been locked.

[WIP] "Adobe Lightroom" for ReShade 2 years 6 months ago #22

I have a GTX 1080 since a while, I think you can understand that I no longer can benchmark shaders :p
The topic has been locked.

[WIP] "Adobe Lightroom" for ReShade 2 years 6 months ago #23

When is this shader available for download, cant wait it looks really good :)
The topic has been locked.

[WIP] "Adobe Lightroom" for ReShade 2 years 6 months ago #24

amoebae wrote:
Marty McFly wrote:

HSV can only adjust the saturation of different hues in 3 ways each. I figured as no one really understood how these 3 ways differ, one saturation control per hue is enough. On top of that, you can now adjust the brightness and hue of those hues as well, like shifting reds more into orange, making blues brighter and so on.
You also have extensive global controls for gamma, exposure, saturation, vibrance and a tool for luma gradient. And a color picker, histogram,, LUT generator as well..
Watch the video I posted, it's shown there. What is not shown in the video because I haven't coded that at the time is a cool and intuitive new approach on vignette.

It's basically HSV, Levels, lift gamma gain, curves (with more control) and a whole lot more as well all in one and nicely working together.

I just made an inappropriate noise :side:

That sounds amazing. Thank you for the explanation.

Being able to output to a LUT will make sharing presets with others really simple, cutting down on performance overhead for them. That being said, do you have any idea what kind of hit we might take if we were to keep the lightroom shader enabled all the time (for continued editing on a shot-per-shot basis for screenshotters)? Would it be akin to using a whole bunch of previous shaders (liftgammagain, curves, hsv, tonemapping etc) or even more performance-hungry (on a par with the more taxing shaders like AO)? I know it's difficult to account for all set-ups, but I'd be interested if you had any idea.


I think that since Lightroom is capable to generate LUT, like it was possible with the old framework ( it will generate a lut that include all the tweak to the shaders of choice ), the performance hit should be like when we had to load the lut, in the tuning palette. How much? It's hard to say before the release, but i think it will be from 0 to 2 fps, depending on the game obviously. Performance concern me too, cause I'm still using a gtx 780, but i'm optimistic about ;)
The topic has been locked.

[WIP] "Adobe Lightroom" for ReShade 2 years 6 months ago #25

The shader that actually loads the generated LUT (LUT.fx on github repo) has almost no calculations and is therefore about as fast as SweetFX shaders like tonemap or monochrome or whatever. For me, the technique runs with 0.004ms. Say a game is clamped to 60 fps (16.666.... ms per frame), ReShade's Frametime is 0.004ms on top of that, the FPS cost itself is 60 - 1/(16.6667 + 0.000004) which is about 0.015 FPS. Formula for any fps hit with any frame time is

FPS before - 1/((1/FPS before) + technique time in ms*1000)
Last Edit: 2 years 6 months ago by Marty McFly.
The topic has been locked.
The following user(s) said Thank You: Echo, Sunesha

[WIP] "Adobe Lightroom" for ReShade 2 years 6 months ago #26

Marty McFly wrote:
The shader that actually loads the generated LUT (LUT.fx on github repo) has almost no calculations and is therefore about as fast as SweetFX shaders like tonemap or monochrome or whatever. For me, the technique runs with 0.004ms. Say a game is clamped to 60 fps (16.666.... ms per frame), ReShade's Frametime is 0.004ms on top of that, the FPS cost itself is 60 - 1/(16.6667 + 0.000004) which is about 0.015 FPS. Formula for any fps hit with any frame time is

FPS before - 1/((1/FPS before) + technique time in ms*1000)
That is awesome. Should mean that it won't have noticeable effect on FPS even on my GTX 960.
The topic has been locked.

[WIP] "Adobe Lightroom" for ReShade 2 years 6 months ago #27

@MartyMcfly , man that is some outstanding high end work my friend. I have been "OCDing" with Need for Speed 2016 for a bit now and there is some areas still that ether have to much red ,green or yellow shade/tint to them.I have tried some effects to try and reduce it but when i do try and reduce or alter those three colors from the area i end up reducing the colors every where else , example yellow car now turns light yellow or white. This project of yours has SO many things i could use .Even for a newb like me :P . Outstanding to say the least.Cant wait to see this become available. I just may have to donate :)
The topic has been locked.

[WIP] "Adobe Lightroom" for ReShade 2 years 6 months ago #28

This looks awesome Marty, thank you for this!

I cannot wait to try this out, up until now I have done everything with Lightroom/Photoshop but with your shader it can just be done in realtime and in-game, it will be so much faster.

You probably hate this question but I am going to ask it anyway:
Do you have any idea when this will be released? or maybe an early version [trial run?] to test it out and report back any problems? :)
Last Edit: 2 years 6 months ago by Kuniyo.
The topic has been locked.

[WIP] "Adobe Lightroom" for ReShade 2 years 6 months ago #29

if anyone is still looking for the HSV shader, here it is:
/*******
Marty McFly's HSV shader
Ported to ReShade 3.0 by moriz1
*******/

//>HSV Settings<\\
uniform float fColorSaturationMod <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 1.00;
	ui_label = "Color Saturation Mod";
	ui_tooltip = "Adds to the overall color saturation.";
> = 0.00;
uniform float fColorSaturationMult <
	ui_type = "drag";
	ui_min = 0.00; ui_max = 5.00;
	ui_label = "Color Saturation Multi";
	ui_tooltip = "Multiplies the color saturation.";
> = 1.00;
uniform float fColorSaturationPow <
	ui_type = "drag";
	ui_min = 0.00; ui_max = 5.00;
	ui_label = "Color Saturation Pow";
	ui_tooltip = "Curves the color saturation.";
> = 1.00;
uniform float fColorIntensityMod <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 1.00;
	ui_label = "Color Intensity Mod";
	ui_tooltip = "Adds to the overall brightness.";
> = 0.00;
uniform float fColorIntensityMult <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 1.00;
	ui_label = "Color Intensity Multi";
	ui_tooltip = "Multiplies the overall brightness.";
> = 1.00;
uniform float fColorIntensityPow <
	ui_type = "drag";
	ui_min = 0.00; ui_max = 5.00;
	ui_label = "Color Intensity Pow";
	ui_tooltip = "Curves the overall brightness.";
> = 1.00;
uniform float fColorHueMod <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 1.00;
	ui_label = "Color Hue Mod";
	ui_tooltip = "Adds to the overall color hue (color shifting).";
> = 0.00;
uniform float fColorHueMult <
	ui_type = "drag";
	ui_min = 0.00; ui_max = 5.00;
	ui_label = "Color Hue Pow";
	ui_tooltip = "Multiplies the color hue (color shifting).";
> = 1.00;
uniform float fColorHuePow <
	ui_type = "drag";
	ui_min = 0.00; ui_max = 5.00;
	ui_label = "Color Hue Multi";
	ui_tooltip = "Curves the color hue.";
> = 1.00;

//>Add Settings<\\
uniform float fSaturationModRed <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 1.00;
	ui_tooltip = "Adds to the color saturation of red hues only. Default 0.0.";
> = 0.00;
uniform float fSaturationModOrange <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 1.00;
	ui_tooltip = "Adds to the color saturation of orange hues only. Default 0.0.";
> = 0.00;
uniform float fSaturationModYellow <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 1.00;
	ui_tooltip = "Adds to the color saturation of yellow hues only. Default 0.0.";
> = 0.00;
uniform float fSaturationModGreen <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 1.00;
	ui_tooltip = "Adds to the color saturation of green hues only. Default 0.0.";
> = 0.00;
uniform float fSaturationModCyan <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 1.00;
	ui_tooltip = "Adds to the color saturation of cyan hues only. Default 0.0.";
> = 0.00;
uniform float fSaturationModBlue <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 1.00;
	ui_tooltip = "Adds to the color saturation of blue hues only. Default 0.0.";
> = 0.00;
uniform float fSaturationModMagenta <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 1.00;
	ui_tooltip = "Adds to the color saturation of magenta hues only. Default 0.0.";
> = 0.00;

//>Mult Settings<\\
uniform float fSaturationMultRed <
	ui_type = "drag";
	ui_min = 0.00; ui_max = 5.00;
	ui_tooltip = "Multiplies the color saturation of red hues only. Default 0.0.";
> = 0.00;
uniform float fSaturationMultOrange <
	ui_type = "drag";
	ui_min = 0.00; ui_max = 5.00;
	ui_tooltip = "Multiplies the color saturation of orange hues only. Default 0.0.";
> = 0.00;
uniform float fSaturationMultYellow <
	ui_type = "drag";
	ui_min = 0.00; ui_max = 5.00;
	ui_tooltip = "Multiplies the color saturation of yellow hues only. Default 0.0.";
> = 0.00;
uniform float fSaturationMultGreen <
	ui_type = "drag";
	ui_min = 0.00; ui_max = 5.00;
	ui_tooltip = "Multiplies the color saturation of green hues only. Default 0.0.";
> = 0.00;
uniform float fSaturationMultCyan <
	ui_type = "drag";
	ui_min = 0.00; ui_max = 5.00;
	ui_tooltip = "Multiplies the color saturation of cyan hues only. Default 0.0.";
> = 0.00;
uniform float fSaturationMultBlue <
	ui_type = "drag";
	ui_min = 0.00; ui_max = 5.00;
	ui_tooltip = "Multiplies the color saturation of blue hues only. Default 0.0.";
> = 1.00;
uniform float fSaturationMultMagenta <
	ui_type = "drag";
	ui_min = 0.00; ui_max = 5.00;
	ui_tooltip = "Multiplies the color saturation of magenta hues only. Default 0.0.";
> = 0.00;

//>Curve Settings<\\
uniform float fSaturationPowRed <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 5.00;
	ui_tooltip = "Curves the color saturation of red hues only. Default 0.0.";
> = 0.00;
uniform float fSaturationPowOrange <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 5.00;
	ui_tooltip = "Curves the color saturation of orange hues only. Default 0.0.";
> = 0.00;
uniform float fSaturationPowYellow <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 5.00;
	ui_tooltip = "Curves the color saturation of yellow hues only. Default 0.0.";
> = 0.00;
uniform float fSaturationPowGreen <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 5.00;
	ui_tooltip = "Curves the color saturation of green hues only. Default 0.0.";
> = 0.00;
uniform float fSaturationPowCyan <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 5.00;
	ui_tooltip = "Curves the color saturation of cyan hues only. Default 0.0.";
> = 0.00;
uniform float fSaturationPowBlue <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 5.00;
	ui_tooltip = "Curves the color saturation of blue hues only. Default 0.0.";
> = 0.00;
uniform float fSaturationPowMagenta <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 5.00;
	ui_tooltip = "Curves the color saturation of magenta hues only. Default 0.0.";
> = 0.00;

#include "ReShade.fxh"

float ColorEqualizerMod(in float H)	
{
	float SMod = 0.0;
	SMod += fSaturationModRed * ( 1.0 - min( 1.0, abs( H / 0.08333333 ) ) );
	SMod += fSaturationModOrange * ( 1.0 - min( 1.0, abs( ( 0.08333333 - H ) / ( - 0.08333333 ) ) ) );
	SMod += fSaturationModYellow * ( 1.0 - min( 1.0, abs( ( 0.16666667 - H ) / ( - 0.16666667 ) ) ) );
	SMod += fSaturationModGreen * ( 1.0 - min( 1.0, abs( ( 0.33333333 - H ) / 0.16666667 ) ) );
	SMod += fSaturationModCyan * ( 1.0 - min( 1.0, abs( ( 0.5 - H ) / 0.16666667 ) ) );
	SMod += fSaturationModBlue * ( 1.0 - min( 1.0, abs( ( 0.66666667 - H ) / 0.16666667 ) ) );
	SMod += fSaturationModMagenta * ( 1.0 - min( 1.0, abs( ( 0.83333333 - H ) / 0.16666667 ) ) );
	SMod += fSaturationModRed * ( 1.0 - min( 1.0, abs( ( 1.0 - H ) / 0.16666667 ) ) );
	return SMod;
}

float ColorEqualizerMult(in float H)
{
	float SMult = 1.0;
	SMult += fSaturationMultRed * ( 1.0 - min( 1.0, abs( H / 0.08333333 ) ) );
	SMult += fSaturationMultOrange * ( 1.0 - min( 1.0, abs( ( 0.08333333 - H ) / ( - 0.08333333 ) ) ) );
	SMult += fSaturationMultYellow * ( 1.0 - min( 1.0, abs( ( 0.16666667 - H ) / ( - 0.16666667 ) ) ) );
	SMult += fSaturationMultGreen * ( 1.0 - min( 1.0, abs( ( 0.33333333 - H ) / 0.16666667 ) ) );
	SMult += fSaturationMultCyan * ( 1.0 - min( 1.0, abs( ( 0.5 - H ) / 0.16666667 ) ) );
	SMult += fSaturationMultBlue * ( 1.0 - min( 1.0, abs( ( 0.66666667 - H ) / 0.16666667 ) ) );
	SMult += fSaturationMultMagenta * ( 1.0 - min( 1.0, abs( ( 0.83333333 - H ) / 0.16666667 ) ) );
	SMult += fSaturationMultRed * ( 1.0 - min( 1.0, abs( ( 1.0 - H ) / 0.16666667 ) ) );
	return SMult;
}

float ColorEqualizerPow(in float H)	
{
	float SPow = 1.0;
	SPow += fSaturationPowRed * ( 1.0 - min( 1.0, abs( H / 0.08333333 ) ) );
	SPow += fSaturationPowOrange * ( 1.0 - min( 1.0, abs( ( 0.08333333 - H ) / ( - 0.08333333 ) ) ) );
	SPow += fSaturationPowYellow * ( 1.0 - min( 1.0, abs( ( 0.16666667 - H ) / ( - 0.16666667 ) ) ) );
	SPow += fSaturationPowGreen * ( 1.0 - min( 1.0, abs( ( 0.33333333 - H ) / 0.16666667 ) ) );
	SPow += fSaturationPowCyan  * ( 1.0 - min( 1.0, abs( ( 0.5 - H ) / 0.16666667 ) ) );
	SPow += fSaturationPowBlue * ( 1.0 - min( 1.0, abs( ( 0.66666667 - H ) / 0.16666667 ) ) );
	SPow += fSaturationPowMagenta * ( 1.0 - min( 1.0, abs( ( 0.83333333 - H ) / 0.16666667 ) ) );
	SPow += fSaturationPowRed * ( 1.0 - min( 1.0, abs( ( 1.0 - H ) / 0.16666667 ) ) );
	return SPow;
}

float3 HUEtoRGB(in float H)
{
   	float R = abs(H * 6.0 - 3.0) - 1.0;
   	float G = 2.0 - abs(H * 6.0 - 2.0);
   	float B = 2.0 - abs(H * 6.0 - 4.0);
   	return saturate(float3(R,G,B));
}

float RGBCVtoHUE(in float3 RGB, in float C, in float V)
{
     	float3 Delta = (V - RGB) / C;
     	Delta.rgb -= Delta.brg;
     	Delta.rgb += float3(2.0,4.0,6.0);
     	Delta.brg = step(V, RGB) * Delta.brg;
     	float H;
     	H = max(Delta.r, max(Delta.g, Delta.b));
     	return frac(H / 6.0);
}

float3 HSVtoRGB(in float3 HSV)
{
   	float3 RGB = HUEtoRGB(HSV.x);
   	return ((RGB - 1) * HSV.y + 1) * HSV.z;
}
 
float3 RGBtoHSV(in float3 RGB)
{
   	float3 HSV = 0.0;
   	HSV.z = max(RGB.r, max(RGB.g, RGB.b));
   	float M = min(RGB.r, min(RGB.g, RGB.b));
   	float C = HSV.z - M;
   	if (C != 0.0)
   	{
     		HSV.x = RGBCVtoHUE(RGB, C, HSV.z);
     		HSV.y = C / HSV.z;
   	}
   	return HSV;
}

float4 PS_HSV(float4 vpos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target
{
	float4 color = tex2D(ReShade::BackBuffer, texcoord.xy);

	float3 hsvcolor = RGBtoHSV( color.xyz );
	//global adjustments
	hsvcolor.x = fColorHueMod + ( fColorHueMult * pow( hsvcolor.x, fColorHuePow ) );
	hsvcolor.y = fColorSaturationMod + ( fColorSaturationMult * pow( hsvcolor.y, fColorSaturationPow ) );
	hsvcolor.z = fColorIntensityMod + ( fColorIntensityMult * pow( hsvcolor.z, fColorIntensityPow ) );
	//hue specific adjustments. Yes, hue. huehuehuehuehue.
	hsvcolor.y = ColorEqualizerMod( hsvcolor.x ) + ( ColorEqualizerMult( hsvcolor.x ) * pow( hsvcolor.y, ColorEqualizerPow( hsvcolor.x ) ) );
	hsvcolor.yz = max( hsvcolor.yz, 0.0 );
	color.xyz = HSVtoRGB( hsvcolor );

	return color;
}

technique HSV_Tech
{
	pass HSVPass
	{
		VertexShader = PostProcessVS;
		PixelShader = PS_HSV;
	}
}

The topic has been locked.
The following user(s) said Thank You: BeTa, amoebae, Sunesha, master2g, Gar Stazi, Myashi, Rudy102

[WIP] "Adobe Lightroom" for ReShade 2 years 5 months ago #30

moriz1 wrote:
if anyone is still looking for the HSV shader, here it is:
/*******
Marty McFly's HSV shader
Ported to ReShade 3.0 by moriz1
*******/

//>HSV Settings<\\
uniform float fColorSaturationMod <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 1.00;
	ui_label = "Color Saturation Mod";
	ui_tooltip = "Adds to the overall color saturation.";
> = 0.00;
uniform float fColorSaturationMult <
	ui_type = "drag";
	ui_min = 0.00; ui_max = 5.00;
	ui_label = "Color Saturation Multi";
	ui_tooltip = "Multiplies the color saturation.";
> = 1.00;
uniform float fColorSaturationPow <
	ui_type = "drag";
	ui_min = 0.00; ui_max = 5.00;
	ui_label = "Color Saturation Pow";
	ui_tooltip = "Curves the color saturation.";
> = 1.00;
uniform float fColorIntensityMod <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 1.00;
	ui_label = "Color Intensity Mod";
	ui_tooltip = "Adds to the overall brightness.";
> = 0.00;
uniform float fColorIntensityMult <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 1.00;
	ui_label = "Color Intensity Multi";
	ui_tooltip = "Multiplies the overall brightness.";
> = 1.00;
uniform float fColorIntensityPow <
	ui_type = "drag";
	ui_min = 0.00; ui_max = 5.00;
	ui_label = "Color Intensity Pow";
	ui_tooltip = "Curves the overall brightness.";
> = 1.00;
uniform float fColorHueMod <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 1.00;
	ui_label = "Color Hue Mod";
	ui_tooltip = "Adds to the overall color hue (color shifting).";
> = 0.00;
uniform float fColorHueMult <
	ui_type = "drag";
	ui_min = 0.00; ui_max = 5.00;
	ui_label = "Color Hue Pow";
	ui_tooltip = "Multiplies the color hue (color shifting).";
> = 1.00;
uniform float fColorHuePow <
	ui_type = "drag";
	ui_min = 0.00; ui_max = 5.00;
	ui_label = "Color Hue Multi";
	ui_tooltip = "Curves the color hue.";
> = 1.00;

//>Add Settings<\\
uniform float fSaturationModRed <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 1.00;
	ui_tooltip = "Adds to the color saturation of red hues only. Default 0.0.";
> = 0.00;
uniform float fSaturationModOrange <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 1.00;
	ui_tooltip = "Adds to the color saturation of orange hues only. Default 0.0.";
> = 0.00;
uniform float fSaturationModYellow <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 1.00;
	ui_tooltip = "Adds to the color saturation of yellow hues only. Default 0.0.";
> = 0.00;
uniform float fSaturationModGreen <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 1.00;
	ui_tooltip = "Adds to the color saturation of green hues only. Default 0.0.";
> = 0.00;
uniform float fSaturationModCyan <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 1.00;
	ui_tooltip = "Adds to the color saturation of cyan hues only. Default 0.0.";
> = 0.00;
uniform float fSaturationModBlue <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 1.00;
	ui_tooltip = "Adds to the color saturation of blue hues only. Default 0.0.";
> = 0.00;
uniform float fSaturationModMagenta <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 1.00;
	ui_tooltip = "Adds to the color saturation of magenta hues only. Default 0.0.";
> = 0.00;

//>Mult Settings<\\
uniform float fSaturationMultRed <
	ui_type = "drag";
	ui_min = 0.00; ui_max = 5.00;
	ui_tooltip = "Multiplies the color saturation of red hues only. Default 0.0.";
> = 0.00;
uniform float fSaturationMultOrange <
	ui_type = "drag";
	ui_min = 0.00; ui_max = 5.00;
	ui_tooltip = "Multiplies the color saturation of orange hues only. Default 0.0.";
> = 0.00;
uniform float fSaturationMultYellow <
	ui_type = "drag";
	ui_min = 0.00; ui_max = 5.00;
	ui_tooltip = "Multiplies the color saturation of yellow hues only. Default 0.0.";
> = 0.00;
uniform float fSaturationMultGreen <
	ui_type = "drag";
	ui_min = 0.00; ui_max = 5.00;
	ui_tooltip = "Multiplies the color saturation of green hues only. Default 0.0.";
> = 0.00;
uniform float fSaturationMultCyan <
	ui_type = "drag";
	ui_min = 0.00; ui_max = 5.00;
	ui_tooltip = "Multiplies the color saturation of cyan hues only. Default 0.0.";
> = 0.00;
uniform float fSaturationMultBlue <
	ui_type = "drag";
	ui_min = 0.00; ui_max = 5.00;
	ui_tooltip = "Multiplies the color saturation of blue hues only. Default 0.0.";
> = 1.00;
uniform float fSaturationMultMagenta <
	ui_type = "drag";
	ui_min = 0.00; ui_max = 5.00;
	ui_tooltip = "Multiplies the color saturation of magenta hues only. Default 0.0.";
> = 0.00;

//>Curve Settings<\\
uniform float fSaturationPowRed <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 5.00;
	ui_tooltip = "Curves the color saturation of red hues only. Default 0.0.";
> = 0.00;
uniform float fSaturationPowOrange <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 5.00;
	ui_tooltip = "Curves the color saturation of orange hues only. Default 0.0.";
> = 0.00;
uniform float fSaturationPowYellow <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 5.00;
	ui_tooltip = "Curves the color saturation of yellow hues only. Default 0.0.";
> = 0.00;
uniform float fSaturationPowGreen <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 5.00;
	ui_tooltip = "Curves the color saturation of green hues only. Default 0.0.";
> = 0.00;
uniform float fSaturationPowCyan <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 5.00;
	ui_tooltip = "Curves the color saturation of cyan hues only. Default 0.0.";
> = 0.00;
uniform float fSaturationPowBlue <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 5.00;
	ui_tooltip = "Curves the color saturation of blue hues only. Default 0.0.";
> = 0.00;
uniform float fSaturationPowMagenta <
	ui_type = "drag";
	ui_min = -1.00; ui_max = 5.00;
	ui_tooltip = "Curves the color saturation of magenta hues only. Default 0.0.";
> = 0.00;

#include "ReShade.fxh"

float ColorEqualizerMod(in float H)	
{
	float SMod = 0.0;
	SMod += fSaturationModRed * ( 1.0 - min( 1.0, abs( H / 0.08333333 ) ) );
	SMod += fSaturationModOrange * ( 1.0 - min( 1.0, abs( ( 0.08333333 - H ) / ( - 0.08333333 ) ) ) );
	SMod += fSaturationModYellow * ( 1.0 - min( 1.0, abs( ( 0.16666667 - H ) / ( - 0.16666667 ) ) ) );
	SMod += fSaturationModGreen * ( 1.0 - min( 1.0, abs( ( 0.33333333 - H ) / 0.16666667 ) ) );
	SMod += fSaturationModCyan * ( 1.0 - min( 1.0, abs( ( 0.5 - H ) / 0.16666667 ) ) );
	SMod += fSaturationModBlue * ( 1.0 - min( 1.0, abs( ( 0.66666667 - H ) / 0.16666667 ) ) );
	SMod += fSaturationModMagenta * ( 1.0 - min( 1.0, abs( ( 0.83333333 - H ) / 0.16666667 ) ) );
	SMod += fSaturationModRed * ( 1.0 - min( 1.0, abs( ( 1.0 - H ) / 0.16666667 ) ) );
	return SMod;
}

float ColorEqualizerMult(in float H)
{
	float SMult = 1.0;
	SMult += fSaturationMultRed * ( 1.0 - min( 1.0, abs( H / 0.08333333 ) ) );
	SMult += fSaturationMultOrange * ( 1.0 - min( 1.0, abs( ( 0.08333333 - H ) / ( - 0.08333333 ) ) ) );
	SMult += fSaturationMultYellow * ( 1.0 - min( 1.0, abs( ( 0.16666667 - H ) / ( - 0.16666667 ) ) ) );
	SMult += fSaturationMultGreen * ( 1.0 - min( 1.0, abs( ( 0.33333333 - H ) / 0.16666667 ) ) );
	SMult += fSaturationMultCyan * ( 1.0 - min( 1.0, abs( ( 0.5 - H ) / 0.16666667 ) ) );
	SMult += fSaturationMultBlue * ( 1.0 - min( 1.0, abs( ( 0.66666667 - H ) / 0.16666667 ) ) );
	SMult += fSaturationMultMagenta * ( 1.0 - min( 1.0, abs( ( 0.83333333 - H ) / 0.16666667 ) ) );
	SMult += fSaturationMultRed * ( 1.0 - min( 1.0, abs( ( 1.0 - H ) / 0.16666667 ) ) );
	return SMult;
}

float ColorEqualizerPow(in float H)	
{
	float SPow = 1.0;
	SPow += fSaturationPowRed * ( 1.0 - min( 1.0, abs( H / 0.08333333 ) ) );
	SPow += fSaturationPowOrange * ( 1.0 - min( 1.0, abs( ( 0.08333333 - H ) / ( - 0.08333333 ) ) ) );
	SPow += fSaturationPowYellow * ( 1.0 - min( 1.0, abs( ( 0.16666667 - H ) / ( - 0.16666667 ) ) ) );
	SPow += fSaturationPowGreen * ( 1.0 - min( 1.0, abs( ( 0.33333333 - H ) / 0.16666667 ) ) );
	SPow += fSaturationPowCyan  * ( 1.0 - min( 1.0, abs( ( 0.5 - H ) / 0.16666667 ) ) );
	SPow += fSaturationPowBlue * ( 1.0 - min( 1.0, abs( ( 0.66666667 - H ) / 0.16666667 ) ) );
	SPow += fSaturationPowMagenta * ( 1.0 - min( 1.0, abs( ( 0.83333333 - H ) / 0.16666667 ) ) );
	SPow += fSaturationPowRed * ( 1.0 - min( 1.0, abs( ( 1.0 - H ) / 0.16666667 ) ) );
	return SPow;
}

float3 HUEtoRGB(in float H)
{
   	float R = abs(H * 6.0 - 3.0) - 1.0;
   	float G = 2.0 - abs(H * 6.0 - 2.0);
   	float B = 2.0 - abs(H * 6.0 - 4.0);
   	return saturate(float3(R,G,B));
}

float RGBCVtoHUE(in float3 RGB, in float C, in float V)
{
     	float3 Delta = (V - RGB) / C;
     	Delta.rgb -= Delta.brg;
     	Delta.rgb += float3(2.0,4.0,6.0);
     	Delta.brg = step(V, RGB) * Delta.brg;
     	float H;
     	H = max(Delta.r, max(Delta.g, Delta.b));
     	return frac(H / 6.0);
}

float3 HSVtoRGB(in float3 HSV)
{
   	float3 RGB = HUEtoRGB(HSV.x);
   	return ((RGB - 1) * HSV.y + 1) * HSV.z;
}
 
float3 RGBtoHSV(in float3 RGB)
{
   	float3 HSV = 0.0;
   	HSV.z = max(RGB.r, max(RGB.g, RGB.b));
   	float M = min(RGB.r, min(RGB.g, RGB.b));
   	float C = HSV.z - M;
   	if (C != 0.0)
   	{
     		HSV.x = RGBCVtoHUE(RGB, C, HSV.z);
     		HSV.y = C / HSV.z;
   	}
   	return HSV;
}

float4 PS_HSV(float4 vpos : SV_Position, float2 texcoord : TEXCOORD) : SV_Target
{
	float4 color = tex2D(ReShade::BackBuffer, texcoord.xy);

	float3 hsvcolor = RGBtoHSV( color.xyz );
	//global adjustments
	hsvcolor.x = fColorHueMod + ( fColorHueMult * pow( hsvcolor.x, fColorHuePow ) );
	hsvcolor.y = fColorSaturationMod + ( fColorSaturationMult * pow( hsvcolor.y, fColorSaturationPow ) );
	hsvcolor.z = fColorIntensityMod + ( fColorIntensityMult * pow( hsvcolor.z, fColorIntensityPow ) );
	//hue specific adjustments. Yes, hue. huehuehuehuehue.
	hsvcolor.y = ColorEqualizerMod( hsvcolor.x ) + ( ColorEqualizerMult( hsvcolor.x ) * pow( hsvcolor.y, ColorEqualizerPow( hsvcolor.x ) ) );
	hsvcolor.yz = max( hsvcolor.yz, 0.0 );
	color.xyz = HSVtoRGB( hsvcolor );

	return color;
}

technique HSV_Tech
{
	pass HSVPass
	{
		VertexShader = PostProcessVS;
		PixelShader = PS_HSV;
	}
}



Thank you. A friend of mine was waiting this one so badly. While my top waited one is Sepia and Tuning Palette. Non i maybe saw somewhere on the forum the tuning palette port ( i didn't check the forum from days so, can't remember where ). Anyway in the 3.02 was included a lut.fx shader, that seems to load custom lut as it did tuning palette. I didn't try it but if it works, i don't need TP shader anymore :) Ofc the need is temporary, cause marty will release LIghtroom :D
I'm wondering if you can port for me the sepia too. It could seem for many a simple shader but it is the very base of every preset i do. I can't emulate it with lift gamma gain and color matrix as some suggested me, cause i use it at the same time of these other too ( and others ).


Question: i read on the forum that you port of DPX as some bug with colors. Is it fixed?
Last Edit: 2 years 5 months ago by Myashi.
The topic has been locked.
The following user(s) said Thank You: master2g

[WIP] "Adobe Lightroom" for ReShade 2 years 5 months ago #31

The topic has been locked.

[WIP] "Adobe Lightroom" for ReShade 2 years 5 months ago #32

Gar Stazi wrote:
Totally missed the post of razed. Thank you so much :)
The topic has been locked.

[WIP] "Adobe Lightroom" for ReShade 2 years 5 months ago #33

Exactly what I'm looking for to quasi-color grade the Arkham Knight with a more cinematic feel without too many shaders activated so as to keep performance hit low. Many thanks Marty and work looks great so far. Can't wait to try this out dude!
The topic has been locked.

[WIP] "Adobe Lightroom" for ReShade 2 years 5 months ago #34

  • Abby
  • Abby's Avatar
Marty McFly wrote:
amoebae wrote:
Myashi wrote:

Anyway on the forum i read that when someone ask for lut,hsv and such... you point them here.

Pardon my ignorance, but I take it this shader will effectively do all that the HSV shader can currently do, then? Because that's a big one I'm missing from 3.0 at the moment. So, it's HSV plus a hell of a lot more - making it the god of shaders in a way?!

HSV can only adjust the saturation of different hues in 3 ways each. I figured as no one really understood how these 3 ways differ, one saturation control per hue is enough. On top of that, you can now adjust the brightness and hue of those hues as well, like shifting reds more into orange, making blues brighter and so on.
You also have extensive global controls for gamma, exposure, saturation, vibrance and a tool for luma gradient. And a color picker, histogram,, LUT generator as well..
Watch the video I posted, it's shown there. What is not shown in the video because I haven't coded that at the time is a cool and intuitive new approach on vignette.

It's basically HSV, Levels, lift gamma gain, curves (with more control) and a whole lot more as well all in one and nicely working together.

Exactly only few people tried it. I am currently using HSV in all newer versions of my project NVIDIA ENB (still did not updated SA and IV), I toke hours on skyrim manually remaking the colors so your new Adobe shader looks faster and easier. but I really hope someone finds ultra "color" filtering effect like FXAA or Deband! because when I get really perfect results with the HSV without touching the brightness (only simple coloring) I get kinda poor dithering and in other games the colors look like it's below 16 bit all caused by the HSV. Can this be filtered and removed? I am not even using any other effects, only HSV
The topic has been locked.

[WIP] "Adobe Lightroom" for ReShade 2 years 5 months ago #35

Marty McFly wrote:
I have a GTX 1080 since a while, I think you can understand that I no longer can benchmark shaders :p
You should do as developers Google Android: disabled two of the four processor cores on and off 1 GB memory of the two, and further optimize the operating system for the good work in this mode. :P
Warning: Spoiler! [ Click to expand ]
The topic has been locked.

[WIP] "Adobe Lightroom" for ReShade 2 years 5 months ago #36

Hello,

I was wondering if there are any updates I missed for the Lightroom shader.
I noticed in the screenshot thread that Razed was already using it, but I cannot find it anywhere :(

Not available yet for the public? or has it been postponed/cancelled?

I'm really interested in this shader so I can cancel my Adobe subscription :D

And thank you for all the work you have done Marty, love your stuff!
The topic has been locked.

[WIP] "Adobe Lightroom" for ReShade 2 years 5 months ago #37

Likewise, I'm really looking forward to being able to use this shader. I suspect there really just aren't enough hours in the day to achieve everything.
The topic has been locked.

[WIP] "Adobe Lightroom" for ReShade 2 years 5 months ago #38

Ditto, I would love to play with this. The ability to crank out a custom LUT at will is very, very appealing :) Great job
The topic has been locked.

[WIP] "Adobe Lightroom" for ReShade 2 years 5 months ago #39

I think Marty's busy making Skyrim pretty for us at the moment. Not enough hours in the day ^^
The topic has been locked.

[WIP] "Adobe Lightroom" for ReShade 2 years 5 months ago #40

im curious, do you think it'd be possible to add the LUT tiering that ganossa included in reshade assistant in the LUT section of Lightroom?
it was something like so in the configurator [ Click to expand ]
it let the LUT dynamically change the image as you looked around, and it was an enjoyable effect to have imo
The topic has been locked.