Multipass sharpening via effect.txt [revision 1.2]

share shaders here
  • Author
  • Message
Offline
*sensei*
Posts: 372
Joined: 28 Jul 2013, 23:26

Re: Multipass sharpening via effect.txt [revision 1.2]

It does have multiple passes, but one also needs more than just passes :) I'm pretty sure it's a straight forward copy of the code lines in effect.txt (so not the entire pixel shader, just the codes that actually do the trick) into the end of enbeffect.fx... then just copy whatever variables you have in GUI from effect.txt.ini into the enbeffect.fx.ini.

If you need some help then just drop me a detailed description of which effects you use in effect.txt, including both your current effect.txt, enbeffect.fx and both related ini files too and I can help you copy stuff over.

Cheers

Offline
User avatar
*sensei*
Posts: 446
Joined: 17 Apr 2014, 22:12
Location: Schweden

Re: Multipass sharpening via effect.txt [revision 1.2]

So it boils down to Kyos black level shader, which looks like this:

Code: Select all

float4 PS_ProcessColor(VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
{
	float4 res;
	float4 coord=0.0;
	coord.xy=IN.txcoord.xy;

	float4 origcolor=tex2Dlod(SamplerColor, coord);

	float KBrightness = lerp( lerp( KBrightnessNight, KBrightnessDay, ENightDayFactor), KBrightnessInt, EInteriorFactor);

	float NoiseMixCurve = lerp( lerp( NoiseMixCurveNight, NoiseMixCurveDay, ENightDayFactor), NoiseMixCurveInt, EInteriorFactor);

	//black-white filter
	//origcolor.xyz=dot(origcolor.xyz, GrayFilter.xyz);
	//MIDHRAS : add comment to line above to regain colour but keep TV noise.
	//scale
	origcolor.xyz*=KBrightness;
	//limit
	origcolor.xyz=clamp(origcolor.xyz, ClampLow, ClampHigh);


	//noise
	coord.xy=IN.txcoord.xy*ScreenSize.y*4000.0;
	coord.y+=frac(Timer.x * 140000.0);
	float4 noisebig=tex2D(SamplerNoise, coord);
	float mixfact=noisebig.x;
	mixfact=saturate((mixfact-0.5)*5.0);

	coord.xy=IN.txcoord.xy*ScreenSize.x*0.008;
	coord.x+=frac((noisebig.y)*frac(Timer.x*100000.0)*1.3);
	coord.y+=frac(Timer.x*160000.0);
	float4 noisecolor=tex2D(SamplerNoise, coord);
	noisecolor.w=lerp(noisecolor.x, noisecolor.y, mixfact);


	//mix gray with noise
	mixfact=dot(origcolor.xyz, 2.133);
	mixfact=pow(saturate(NoiseMixMultiplier*mixfact), NoiseMixCurve);
	noisecolor.x=noisecolor.w*AdditiveNoiseFactor;
	noisecolor.w=lerp(MultiplicativeNoiseMin, MultiplicativeNoiseMax, noisecolor.w);

	if (K_BlacknessLevels==true) {
	res.xyz=lerp(origcolor.xyz*noisecolor.w+noisecolor.x, origcolor.xyz, mixfact);
	}

	if (K_BlacknessLevels==false) {
	res.xyz=origcolor.rgb;
	}

	res.w=1.0;
	return res;
}
So how do I use this in enbeffect? The tweakable parameters at the top I can handle, same for the .ini. But the code itself is not that easy.. :(

Edit: I've uploaded my files here. http://www.mediafire.com/download/1vdz2ujlb5b9np7
_________________
| i5 3350p @3.1 | 16 GB RAM | GTX1060 | Skyrim on SSD |
My Flickr
My Soundcloud
CGI ENB

Offline
User avatar
*blah-blah-blah maniac*
Posts: 1938
Joined: 05 Mar 2012, 02:08

Re: Multipass sharpening via effect.txt [revision 1.2]

Kanske nåt sånt här, vet dock ej ifall jag skrivit den som en fungerande kod med samma funktioner. Men bara genom att titta på koden och redigera den här i kommentator boxen, så såg det ut som detta var ändringarna som behövdes för att få den från effect.txt till enbeffect.fx
I vilket fall som helst så är detta en effekt som borde placeras i botten av din enbeffect.fx

Innan dessa linjer inuti pixel shadern PS_D6EC7DD1

Code: Select all

    _oC0.w=1.0f;
    _oC0.xyz=color.xyz;
    return _oC0;

Den kommentator redigerade koden då, kan innehålla fel!

Code: Select all

float3 origcolor=color.xyz;

   float KBrightness = lerp( lerp( KBrightnessNight, KBrightnessDay, ENightDayFactor), KBrightnessInt, EInteriorFactor);

   float NoiseMixCurve = lerp( lerp( NoiseMixCurveNight, NoiseMixCurveDay, ENightDayFactor), NoiseMixCurveInt, EInteriorFactor);

   //black-white filter
   //origcolor.xyz=dot(origcolor.xyz, GrayFilter.xyz);
   //MIDHRAS : add comment to line above to regain colour but keep TV noise.
   //scale
   origcolor.xyz*=KBrightness;
   //limit
   origcolor.xyz=clamp(origcolor.xyz, ClampLow, ClampHigh);


   //noise
   _v0.xy=IN.txcoord0.xy*ScreenSize.y*4000.0;
   _v0.y+=frac(Timer.x * 140000.0);
   float4 noisebig=tex2D(SamplerNoise, _v0);
   float mixfact=noisebig.x;
   mixfact=saturate((mixfact-0.5)*5.0);

   _v0.xy=IN.txcoord0.xy*ScreenSize.x*0.008;
   _v0.x+=frac((noisebig.y)*frac(Timer.x*100000.0)*1.3);
   _v0.y+=frac(Timer.x*160000.0);
   float4 noisecolor=tex2D(SamplerNoise, _v0); // Enter _s0 here perhaps? or does the noise sampler contain a specific color "pattern"/texture, in a way similar to bloom samplers having different blurred textures, or what??
   noisecolor.w=lerp(noisecolor.x, noisecolor.y, mixfact);


   //mix gray with noise
   mixfact=dot(origcolor.xyz, 2.133);
   mixfact=pow(saturate(NoiseMixMultiplier*mixfact), NoiseMixCurve);
   noisecolor.x=noisecolor.w*AdditiveNoiseFactor;
   noisecolor.w=lerp(MultiplicativeNoiseMin, MultiplicativeNoiseMax, noisecolor.w);

   if (K_BlacknessLevels==true) {
   color.xyz=lerp(origcolor.xyz*noisecolor.w+noisecolor.x, origcolor.xyz, mixfact);
   }

   if (K_BlacknessLevels==false) {
   color.xyz=origcolor.rgb;
   }
5 sekunders redigering, så ursäkta mig ifall det ser galet ut.
EN: 5 seconds code edit, so excuse if it looks crazy. Use Google translate for the rest if you wanna know what I wrote to Insomnia in our native tongue.

Offline
*sensei*
Posts: 372
Joined: 28 Jul 2013, 23:26

Re: Multipass sharpening via effect.txt [revision 1.2]

Not gonna work in enbeffect.fx because SamplerNoise is only in effect.txt.

What you can do is add it to the effect.txt of mine under the afterfx part, should be even easier...

Just copy the whole thing between

float4 PS_ProcessColor(VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
{

THIS PART ONLY

}

in the effect.txt file before the NOISE and LETTERBOX part (so at the beginning after color is set. Bleh, how am I going to explain it. Here you go:
https://drive.google.com/file/d/0B1jPJD ... sp=sharing

I added an enable function use_kyoeffect, so add that to GUI (bool use_kyoeffect < blablabla)... add the other GUI functions this effect has as well and have fun :)

PS. Not sure if you really need this code... better to just add levels because noise filter is already there in the file. Would be a lot simpler.

Offline
User avatar
*blah-blah-blah maniac*
Posts: 1938
Joined: 05 Mar 2012, 02:08

Re: Multipass sharpening via effect.txt [revision 1.2]

Yeah I kinda figured it was some sort of pre-configured noise texture similar in ways like the bloom samplers are pre-configured blurred textures for use in creating bloom.

From just skimming through the code though, does it function like a black level (similar to additive brightness applied from 0 going up to 1) and applies the effect based on the noise texture? If so a grain function can be computed in the enbeffect.fx and replace the noise sampler. If it works like I think it works, in a general sense.
But in any case, such an effect belongs more in the effect.txt file rather than the enbeffect.txt. in my own eyes.

I haven't tried it out so I have really no confirmed way of how it operates.

Offline
*sensei*
Posts: 372
Joined: 28 Jul 2013, 23:26

Re: Multipass sharpening via effect.txt [revision 1.2]

Not sure what SamplerNoise does... I suppose it would give out a single pixel on each pass that one could simply add to color like

float3 noise = tex2D( SamplerNoise, 0.5 ).xyz;
color.xyz = lerp( color.xyz, color.xyz + noise.xyz, strength );

Or something similar. I haven't toyed with it.

Offline
User avatar
*sensei*
Posts: 446
Joined: 17 Apr 2014, 22:12
Location: Schweden

Re: Multipass sharpening via effect.txt [revision 1.2]

Thanks a ton guys! :)

I tried Jawz method first and saw that SamplerNoise were missing in enbeffect. So I added those samplers and textures but to no avail. Didn't work.
Having Kyos level shader really helps darken the shadows so I think it's essential. Otherwise my shadows are blueish.

Well, I'm starting to tweak here and there. I'm adding contrast and vibrance to the effect.txt and hopefully I can provide something useful when I'm done with the file.

Thanks again! :)
_________________
| i5 3350p @3.1 | 16 GB RAM | GTX1060 | Skyrim on SSD |
My Flickr
My Soundcloud
CGI ENB

Offline
User avatar
*sensei*
Posts: 446
Joined: 17 Apr 2014, 22:12
Location: Schweden

Re: Multipass sharpening via effect.txt [revision 1.2]

Here's my effect.txt as it is now.... Tried to add the ENB color shift but strangely it removed the other effects in that pixel shader.
Added vibrance, contrast and vignette.
Thanks again guys!

Code: Select all

/*
 *	SHADER ADDON
 * 	Featuring: 
 *	Multipass Unsharp Mask
 *	- Radius, Amount and Threshold controls
 *	- Blur edges controls to reduce aliasing effects of sharpening
 *	- Noise and Letterbox after effects
 *	- Apply sharpening based on Depth information
 *	By prod80 - Serenity ENB
 *	
 *	Vibrance and Contrast by ZeroKing (implemented by Insomnia)
 *	K ENB levels by Kyokushinoyama (implemented by Prod80)
 *	ENB Vignette implemented by Insomnia
 */

/*
 *	ENBSeries
 *	visit http://enbdev.com for updates
 *	Copyright (c) 2007-2014 Boris Vorontsov
 */ 
 
//--------------------------//
//   Internal parameters	// 
//     Can be modified		//
//--------------------------// 


//============================================================== 
//	Vibrance and Contrast by ZeroKing
//============================================================== 

bool Vibrance2 <
	string UIName = "----------Vibrance parameters----------";
> = {true};

bool   C_VIBRANCE <
	string UIName =  "Enable Vibrance";
> = {false};


float	VibranceDayExt <
	string UIName="Vibrance - Exterior Day";
	string UIWidget="Spinner";
	float UIMin=-1.0;
	float UIMax=1.0;
> = {0};

float	VibranceDayInt <
	string UIName="Vibrance - Interior Day";
	string UIWidget="Spinner";
	float UIMin=-1.0;
	float UIMax=1.0;
> = {0};

float	VibranceNightExt <
	string UIName="Vibrance - Exterior Night";
	string UIWidget="Spinner";
	float UIMin=-1.0;
	float UIMax=1.0;
> = {0};

float	VibranceNightInt <
	string UIName="Vibrance - Interior Night";
	string UIWidget="Spinner";
	float UIMin=-1.0;
	float UIMax=1.0;
> = {0};
	

//	Contrast parameters 

bool Contrast1 <
	string UIName = "-------Contrast parameters-------";
> = {true};


bool   C_CONTRASTCURVES <
	string UIName =  "Enable Contrast";
> = {false};

float	ContrastCurveDayExt <
	string UIName="Contrast - Exterior Day";
	string UIWidget="Spinner";
	float UIMin=-1.0;
	float UIMax=1.0;
> = {0};

float	ContrastCurveDayInt <
	string UIName="Contrast - Interior Day";
	string UIWidget="Spinner";
	float UIMin=-1.0;
	float UIMax=1.0;
> = {0};

float	ContrastCurveNightExt <
	string UIName="Contrast - Exterior Night";
	string UIWidget="Spinner";
	float UIMin=-1.0;
	float UIMax=1.0;
> = {0};

float	ContrastCurveNightInt <
	string UIName="Contrast - Interior Night";
	string UIWidget="Spinner";
	float UIMin=-1.0;
	float UIMax=1.0;
> = {0};



bool Section_Sharpen <
	string UIName =  "------Sharpening------------";
> = {false};
bool shader_off <
	string UIName="Show Original";
> = {false};
bool show_edges <
	string UIName="Show Edges";
> = {false};
bool smooth_edges <
	string UIName="Use Edge Smoothing";
> = {true};
float smooth <
	string UIName="Edge Smoothing Intensity";
	string UIWidget="Spinner";
	float UIMin=0.3;
	float UIMax=1;
	float UIStep=0.001;
> = {0.52};
float farDepth <
	string UIName="Depth Sharpening: Far Depth";
	string UIWidget="Spinner";
	float UIMin=0.0;
	float UIMax=100000.0;
	float UIStep=0.1;
> = {100.0};
float limiter <
	string UIName="Sharpening Highlights Limiter";
	string UIWidget="Spinner";
	float UIMin=0;
	float UIMax=1;
	float UIStep=0.001;
> = {0.1};
bool luma_sharpen <
	string UIName="Use Luma Sharpen";
> = {true};
float BlurSigmaE <
	string UIName="Blur Sigma Exterior";
	string UIWidget="Spinner";
	float UIMin=0.3;
	float UIMax=2;
	float UIStep=0.001;
> = {0.87};
float BlurSigmaI <
	string UIName="Blur Sigma Interior";
	string UIWidget="Spinner";
	float UIMin=0.3;
	float UIMax=2;
	float UIStep=0.001;
> = {0.98};
float SharpeningE <
	string UIName="Sharpening Strength Exterior";
	string UIWidget="Spinner";
	float UIMin=0;
	float UIMax=5;
	float UIStep=0.001;
> = {1.67};
float SharpeningI <
	string UIName="Sharpening Strength Interior";
	string UIWidget="Spinner";
	float UIMin=0;
	float UIMax=5;
	float UIStep=0.001;
> = {1.87};
float ThresholdE <
	string UIName="Sharpening Threshold Exterior";
	string UIWidget="Spinner";
	float UIMin=0;
	float UIMax=255;
	float UIStep=1;
> = {1};
float ThresholdI <
	string UIName="Sharpening Threshold Interior";
	string UIWidget="Spinner";
	float UIMin=0;
	float UIMax=255;
	float UIStep=1;
> = {0};
bool Section_Letterbox <
	string UIName =  "------Letterbox-------------";
> = {false};
bool use_letterbox <
	string UIName="Enable Letterbox";
> = {false};
float letterbox_size <
	string UIName="Letterbox Size (%)";
	string UIWidget="Spinner";
	float UIMin=0.0;
	float UIMax=100.0;
	float UIStep=0.1;
> = {7.8};




//============================================================== 
//	Kinematic settings from Kyokushinoyamas K ENB
//============================================================== 

bool Kinematic2 <
	string UIName = "--------Kyos Kinematic parameters--------";
> = {true};

bool   K_BlacknessLevels <
	string UIName =  "Enable Kinematic Blackness";
> = {false};

bool use_kyoeffect <
	string UIName = "Enable Kinematic Levels";
> = {true};


//First Filter
float3 GrayFilter=float3(0.5285, 0.515, 0.515);	// 0.520	// 0.55 //<-[KYO : More pizza]	// 0.52885	// 0.5285

float ClampLow=0.000005;
float ClampHigh=15.25;


float KBrightnessDay <
string UIName="Brightness Day";
string UIWidget="Spinner";
float UIMin=0.01;
float UIMax=5.0;
float UIStep=0.001;
> = {1.02};

float KBrightnessNight <
string UIName="Brightness Night";
string UIWidget="Spinner";
float UIMin=0.01;
float UIMax=5.0;
float UIStep=0.001;
> = {1.02};

float KBrightnessInt <
string UIName="Brightness Interior";
string UIWidget="Spinner";
float UIMin=0.01;
float UIMax=5.0;
float UIStep=0.001;
> = {1.02};


float NoiseMixCurveDay <
string UIName="Noise Mix Curve Day";
string UIWidget="Spinner";
float UIMin=0.01;
float UIMax=5.0;
float UIStep=0.001;
> = {0.02};

float NoiseMixCurveNight <
string UIName="Noise Mix Curve Night";
string UIWidget="Spinner";
float UIMin=0.01;
float UIMax=5.0;
float UIStep=0.001;
> = {0.02};

float NoiseMixCurveInt <
string UIName="Noise Mix Curve Interior";
string UIWidget="Spinner";
float UIMin=0.01;
float UIMax=5.0;
float UIStep=0.001;
> = {0.02};


float NoiseMixMultiplier <
string UIName="Noise Mix Multiplier";
string UIWidget="Spinner";
float UIMin=0.01;
float UIMax=1.0;
float UIStep=0.001;
> = {0.15};


float AdditiveNoiseFactor=0.0075; 		// [More ANF = more noise] // [Comment this line to disable the B&W filter entirely]
float MultiplicativeNoiseMin=-0.45;
float MultiplicativeNoiseMax=-0.45;



bool Section_Noise <
	string UIName =  "------Noise-----------------";
> = {false};
bool use_noise <
	string UIName="Enable Grain";
> = {true};
float GrainMotion <		
	string UIName="Grain Motion";
	string UIWidget="Spinner";
	float UIMin=0.0;
	float UIMax=50.0;
	float UIStep=0.001;
> = {0.004};
float GrainSaturation  <		
	string UIName="Grain Saturation";
	string UIWidget="Spinner";
	float UIMin=0.0;
	float UIMax=50.0;
	float UIStep=0.001;
> = {1.0};
float GrainIntensity <		
	string UIName="Grain Intensity";
	string UIWidget="Spinner";
	float UIMin=0.0;
	float UIMax=50.0;
	float UIStep=0.001;
> = {0.004};

//============================================================== 

bool Vignette2 <
	string UIName = "----------Vignette parameters----------";
> = {true};

bool Vignette <
	string UIName = "Enable Vignette";
> = {true};

//	Vignette parameters

float EVignetteAmountDay <
string UIName="Vignette Amount Day";
string UIWidget="Spinner";
float UIMin=0.0;
float UIMax=10.0;
> = {0.6};

float EVignetteCurveDay <
string UIName="Vignette Curve Day";
string UIWidget="Spinner";
float UIMin=0.0;
float UIMax=10.0;
> = {1.0};

float EVignetteRadiusDay <
string UIName="Vignette Radius Day";
string UIWidget="Spinner";
float UIMin=0.0;
float UIMax=10.0;
> = {1.4};

float EVignetteAmountNight <
string UIName="Vignette Amount Night";
string UIWidget="Spinner";
float UIMin=0.0;
float UIMax=10.0;
> = {0.6};

float EVignetteCurveNight <
string UIName="Vignette Curve Night";
string UIWidget="Spinner";
float UIMin=0.0;
float UIMax=10.0;
> = {1.0};

float EVignetteRadiusNight <
string UIName="Vignette Radius Night";
string UIWidget="Spinner";
float UIMin=0.0;
float UIMax=10.0;
> = {1.4};

float3 EVignetteColor <
string UIName="Vignette Color";
string UIWidget="Color";
> = {0.0, 0.0, 0.0};

//	Vignette Interior parameters

float EVignetteAmountInterior <
string UIName="Vignette Amount Interior";
string UIWidget="Spinner";
float UIMin=0.0;
float UIMax=10.0;
> = {0.6};

float EVignetteCurveInterior <
string UIName="Vignette Curve Interior";
string UIWidget="Spinner";
float UIMin=0.0;
float UIMax=10.0;
> = {1.0};

float EVignetteRadiusInterior <
string UIName="Vignette Radius Interior";
string UIWidget="Spinner";
float UIMin=0.0;
float UIMax=10.0;
> = {1.4};



////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		
//--------------------------//
//   External parameters	// 
//     Do not modify		//
//--------------------------//

////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Keyboard controlled temporary variables. 
// Press and hold key 1,2,3...8 together with PageUp or PageDown to modify. 
// By default all set to 1.0
float4	tempF1; 			//0,1,2,3
float4	tempF2; 			//5,6,7,8
float4	tempF3; 			//9,0
float4	Timer;				//x=generic timer in range 0..1, period of 16777216 ms (4.6 hours), w=frame time elapsed (in seconds)
float4	ScreenSize;			//x=Width, y=1/Width, z=ScreenScaleY, w=1/ScreenScaleY
float	ENightDayFactor;	//changes in range 0..1, 0 means that night time, 1 - day time
float	EInteriorFactor;	//changes 0 or 1. 0 means that exterior, 1 - interior
////////////////////////////////////////////////////////////////////////////////////////////////////////////////

//////////////////
//	TEXTURES	//
//////////////////
texture2D texOriginal;
texture2D texColor;
texture2D texNoise;
texture2D texDepth;

///////////////////
//	 SAMPLERS	 //
///////////////////
sampler2D SamplerColor = sampler_state
{
	Texture   = <texOriginal>;
	MinFilter = LINEAR;
	MagFilter = LINEAR;
	MipFilter = NONE;
	AddressU  = Clamp;
	AddressV  = Clamp;
	SRGBTexture=FALSE;
	MaxMipLevel=0;
	MipMapLodBias=0;
};

sampler2D SamplerColor2 = sampler_state
{
	Texture   = <texColor>;
	MinFilter = LINEAR;
	MagFilter = LINEAR;
	MipFilter = NONE;
	AddressU  = Clamp;
	AddressV  = Clamp;
	SRGBTexture=FALSE;
	MaxMipLevel=0;
	MipMapLodBias=0;
};

sampler2D SamplerNoise = sampler_state
{
	Texture   = <texNoise>;
	MinFilter = LINEAR;
	MagFilter = LINEAR;
	MipFilter = NONE;
	AddressU  = Wrap;
	AddressV  = Wrap;
	SRGBTexture=FALSE;
	MaxMipLevel=0;
	MipMapLodBias=0;
};

sampler2D SamplerDepth = sampler_state
{
	Texture   = <texDepth>;
	MinFilter = POINT;
	MagFilter = POINT;
	MipFilter = NONE;
	AddressU  = Clamp;
	AddressV  = Clamp;
	SRGBTexture=FALSE;
	MaxMipLevel=0;
	MipMapLodBias=0;
};

//////////////////
//	 STRUCTS	//
//////////////////
struct VS_OUTPUT_POST
{
	float4 vpos  : POSITION;
	float2 txcoord : TEXCOORD0;
};

struct VS_INPUT_POST
{
	float3 pos  : POSITION;
	float2 txcoord : TEXCOORD0;
};

VS_OUTPUT_POST VS_PostProcess(VS_INPUT_POST IN)
{
	VS_OUTPUT_POST OUT;

	float4 pos=float4(IN.pos.x,IN.pos.y,IN.pos.z,1.0);

	OUT.vpos=pos;
	OUT.txcoord.xy=IN.txcoord.xy;

	return OUT;
}

//////////////////
// HELPER FUNCS //
//////////////////

float3 RGBToHSL(float3 color)
{
	float3 hsl; // init to 0 to avoid warnings ? (and reverse if + remove first part)
	
	float fmin = min(min(color.r, color.g), color.b);
	float fmax = max(max(color.r, color.g), color.b);
	float delta = fmax - fmin;

	hsl.z = (fmax + fmin) / 2.0;

	if (delta == 0.0) //No chroma
	{
		hsl.x = 0.0;	// Hue
		hsl.y = 0.0;	// Saturation
	}
	else //Chromatic data
	{
		if (hsl.z < 0.5)
			hsl.y = delta / (fmax + fmin); // Saturation
		else
			hsl.y = delta / (2.0 - fmax - fmin); // Saturation
		
		float deltaR = (((fmax - color.r) / 6.0) + (delta / 2.0)) / delta;
		float deltaG = (((fmax - color.g) / 6.0) + (delta / 2.0)) / delta;
		float deltaB = (((fmax - color.b) / 6.0) + (delta / 2.0)) / delta;

		if (color.r == fmax )
			hsl.x = deltaB - deltaG; // Hue
		else if (color.g == fmax)
			hsl.x = (1.0 / 3.0) + deltaR - deltaB; // Hue
		else if (color.b == fmax)
			hsl.x = (2.0 / 3.0) + deltaG - deltaR; // Hue

		if (hsl.x < 0.0)
			hsl.x += 1.0; // Hue
		else if (hsl.x > 1.0)
			hsl.x -= 1.0; // Hue
	}

	return hsl;
}

float HueToRGB(float f1, float f2, float hue)
{
	if (hue < 0.0)
		hue += 1.0;
	else if (hue > 1.0)
		hue -= 1.0;
	float res;
	if ((6.0 * hue) < 1.0)
		res = f1 + (f2 - f1) * 6.0 * hue;
	else if ((2.0 * hue) < 1.0)
		res = f2;
	else if ((3.0 * hue) < 2.0)
		res = f1 + (f2 - f1) * ((2.0 / 3.0) - hue) * 6.0;
	else
		res = f1;
	return res;
}

float3 HSLToRGB(float3 hsl)
{
	float3 rgb;
	
	if (hsl.y == 0.0)
		rgb = float3(hsl.z, hsl.z, hsl.z); // Luminance
	else
	{
		float f2;
		
		if (hsl.z < 0.5)
			f2 = hsl.z * (1.0 + hsl.y);
		else
			f2 = (hsl.z + hsl.y) - (hsl.y * hsl.z);
			
		float f1 = 2.0 * hsl.z - f2;
		
		rgb.r = HueToRGB(f1, f2, hsl.x + (1.0/3.0));
		rgb.g = HueToRGB(f1, f2, hsl.x);
		rgb.b= HueToRGB(f1, f2, hsl.x - (1.0/3.0));
	}
	
	return rgb;
}

// PI, required to calculate weight
static const float PI = 3.1415926535897932384626433832795;

// Luminance Blend
float3 BlendLuma( float3 base, float3 blend )
{
	float3 HSLBase 	= RGBToHSL( base );
	float3 HSLBlend	= RGBToHSL( blend );
	return HSLToRGB( float3( HSLBase.x, HSLBase.y, HSLBlend.z ));
}

// Pseudo Random Number generator. 
float random(in float2 uv)
{
float2 noise = (frac(sin(dot(uv , float2(12.9898,78.233) * 2.0)) * 43758.5453));
return abs(noise.x + noise.y) * 0.5;
}

// Linear depth
float linearDepth(float d, float n, float f)
{
	return (2.0 * n)/(f + n - d * (f - n));
}

//////////////////
//	 SHADERS	//
//////////////////

float4 PS_ProcessGaussianH(VS_OUTPUT_POST IN) : COLOR
{
	float px 			= ScreenSize.y; 
	float4 color		= 0.0;
	float Depth			= tex2D( SamplerDepth, IN.txcoord.xy ).x;
	float linDepth		= linearDepth( Depth, 0.5f, farDepth );
	
	float SigmaSum		= 0.0f;
	float sampleOffset	= 1.0f;
	
	//Gaussian
	float BlurSigma		= lerp( BlurSigmaE, BlurSigmaI, EInteriorFactor );
	BlurSigma			= max( BlurSigma * ( 1.0f - linDepth ), 0.3f );
	float3 Sigma;
	Sigma.x				= 1.0f / ( sqrt( 2.0f * PI ) * BlurSigma );
	Sigma.y				= exp( -0.5f / ( BlurSigma * BlurSigma ));
	Sigma.z				= Sigma.y * Sigma.y;
	
	//Center weight
	color				= tex2D(SamplerColor2, IN.txcoord.xy);
	color				*= Sigma.x;
	SigmaSum			+= Sigma.x;
	Sigma.xy			*= Sigma.yz;

	for(int i = 0; i < 7; ++i) {
		color 			+= tex2D(SamplerColor2, IN.txcoord.xy + float2(sampleOffset*px, 0.0)) * Sigma.x;
		color 			+= tex2D(SamplerColor2, IN.txcoord.xy - float2(sampleOffset*px, 0.0)) * Sigma.x;
		SigmaSum		+= ( 2.0f * Sigma.x );
		sampleOffset	= sampleOffset + 1.0f;
		Sigma.xy		*= Sigma.yz;
		}
		
	color.xyz			/= SigmaSum;
	color.w				= 1.0f;
	return color;
}

float4 PS_ProcessGaussianV(VS_OUTPUT_POST IN) : COLOR
{
	float sHeight		= ScreenSize.x * ScreenSize.w;
	float py 			= 1.0 / sHeight;
	float4 color		= 0.0;
	float Depth			= tex2D( SamplerDepth, IN.txcoord.xy ).x;
	float linDepth		= linearDepth( Depth, 0.5f, farDepth );
	
	float SigmaSum		= 0.0f;
	float sampleOffset	= 1.0f;
	
	//Gaussian
	float BlurSigma		= lerp( BlurSigmaE, BlurSigmaI, EInteriorFactor );
	BlurSigma			= max( BlurSigma * ( 1.0f - linDepth ), 0.3f );
	float3 Sigma;
	Sigma.x				= 1.0f / ( sqrt( 2.0f * PI ) * BlurSigma );
	Sigma.y				= exp( -0.5f / ( BlurSigma * BlurSigma ));
	Sigma.z				= Sigma.y * Sigma.y;
	
	//Center weight
	color				= tex2D(SamplerColor2, IN.txcoord.xy);
	color				*= Sigma.x;
	SigmaSum			+= Sigma.x;
	Sigma.xy			*= Sigma.yz;

	for(int i = 0; i < 7; ++i) {
		color 			+= tex2D(SamplerColor2, IN.txcoord.xy + float2(0.0, sampleOffset*py)) * Sigma.x;
		color 			+= tex2D(SamplerColor2, IN.txcoord.xy - float2(0.0, sampleOffset*py)) * Sigma.x;
		SigmaSum		+= ( 2.0f * Sigma.x );
		sampleOffset	= sampleOffset + 1.0f;
		Sigma.xy		*= Sigma.yz;
		}
	
	color.xyz			/= SigmaSum;
	color.w				= 1.0f;
	return color;
}

float4 PS_ProcessEdges(VS_OUTPUT_POST IN) : COLOR
{
	float Sharpening	= lerp( SharpeningE, SharpeningI, EInteriorFactor );
	float Threshold		= lerp( ThresholdE, ThresholdI, EInteriorFactor ) / 255;
	
	float4 color;
	float4 orig			= tex2D(SamplerColor, IN.txcoord.xy);
	float4 blurred		= tex2D(SamplerColor2, IN.txcoord.xy);
	
	//Find edges
	orig.xyz			= saturate( orig.xyz );
	blurred.xyz			= saturate( blurred.xyz );
	float3 Edges		= max( saturate( orig.xyz - blurred.xyz ) - Threshold, 0.0f );
	float3 invBlur		= saturate( 1.0f - blurred.xyz );
	float3 originvBlur	= saturate( orig.xyz + invBlur.xyz );
	float3 invOrigBlur	= max( saturate( 1.0f - originvBlur.xyz ) - Threshold, 0.0f );
	
	float3 edges		= max(( saturate( Sharpening * Edges.xyz )) - ( saturate( Sharpening * invOrigBlur.xyz )), 0.0f );
	
	color.xyz			= edges.xyz;
	color.w				= 1.0f;
	return color;
}

float4 PS_ProcessSharpen1(VS_OUTPUT_POST IN) : COLOR
{
	//Smooth out edges with extremely light gaussian
	float4 edges		= tex2D(SamplerColor2, IN.txcoord.xy);
	
	if (smooth_edges==false) return edges;
	
	float px 			= ScreenSize.y; 
	float4 color		= 0.0;
	
	float SigmaSum		= 0.0f;
	float sampleOffset	= 1.0f;
	
	//Gaussian
	float BlurSigma		= smooth;
	float3 Sigma;
	Sigma.x				= 1.0f / ( sqrt( 2.0f * PI ) * BlurSigma );
	Sigma.y				= exp( -0.5f / ( BlurSigma * BlurSigma ));
	Sigma.z				= Sigma.y * Sigma.y;
	
	//Center weight
	edges				*= Sigma.x;
	SigmaSum			+= Sigma.x;
	Sigma.xy			*= Sigma.yz;

	for(int i = 0; i < 5; ++i) {
		edges 			+= tex2D(SamplerColor2, IN.txcoord.xy + float2(sampleOffset*px, 0.0)) * Sigma.x;
		edges 			+= tex2D(SamplerColor2, IN.txcoord.xy - float2(sampleOffset*px, 0.0)) * Sigma.x;
		SigmaSum		+= ( 2.0f * Sigma.x );
		sampleOffset	= sampleOffset + 1.0f;
		Sigma.xy		*= Sigma.yz;
		}
		
	color.xyz			= edges.xyz / SigmaSum;
	color.w				= 1.0f;
	return color;

}

float4 PS_ProcessSharpen2(VS_OUTPUT_POST IN) : COLOR
{
	float4 orig			= tex2D(SamplerColor, IN.txcoord.xy);
	float4 edges		= tex2D(SamplerColor2, IN.txcoord.xy);

	//Smooth out edges (reduce aliasing) - expensive, likely
	float sHeight		= ScreenSize.x * ScreenSize.w;
	float py 			= 1.0 / sHeight;
	float4 color		= 0.0;
	
	if (smooth_edges==true) {
	
		float SigmaSum		= 0.0f;
		float sampleOffset	= 1.0f;
		
		//Gaussian
		float BlurSigma		= smooth;
		float3 Sigma;
		Sigma.x				= 1.0f / ( sqrt( 2.0f * PI ) * BlurSigma );
		Sigma.y				= exp( -0.5f / ( BlurSigma * BlurSigma ));
		Sigma.z				= Sigma.y * Sigma.y;
		
		//Center weight
		edges				*= Sigma.x;
		SigmaSum			+= Sigma.x;
		Sigma.xy			*= Sigma.yz;

		for(int i = 0; i < 5; ++i) {
			edges 			+= tex2D(SamplerColor2, IN.txcoord.xy + float2(0.0, sampleOffset*py)) * Sigma.x;
			edges 			+= tex2D(SamplerColor2, IN.txcoord.xy - float2(0.0, sampleOffset*py)) * Sigma.x;
			SigmaSum		+= ( 2.0f * Sigma.x );
			sampleOffset	= sampleOffset + 1.0f;
			Sigma.xy		*= Sigma.yz;
			}
		
		edges.xyz			/= SigmaSum;
	}
	
	if (show_edges==true) {
		color.w 		= 1.0f;
		if(luma_sharpen==true) {
			color.xyz 	= min( dot( edges.xyz, float3( 0.2126, 0.7152, 0.0722 )), limiter );
			} else {
			color.xyz 	= edges.xyz * limiter;
			}
		return color;
	}
	
	if (luma_sharpen==true) {
		float3 blend	= saturate( orig.xyz + min( dot( edges.xyz, float3( 0.2126, 0.7152, 0.0722 )), limiter ));
		color.xyz		= BlendLuma( orig.xyz, blend.xyz );
		} else {
		color.xyz		= saturate( orig.xyz + ( edges.xyz * limiter ));
	}
	
	if (shader_off==true) color.xyz = orig.xyz;

	color.w				= 1.0f;
	return color;

}





float4 PS_ProcessVibrance(VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
{

	float Vibrance = lerp(VibranceNightExt, VibranceDayExt, ENightDayFactor);
	if (EInteriorFactor) 
	{
		Vibrance = lerp(VibranceNightInt, VibranceDayInt, ENightDayFactor);
	};
	
	float4	res;
	float3	origcolor = tex2D(SamplerColor2, IN.txcoord.xy);
	float3	lumCoeff = float3(0.212656, 0.715158, 0.072186);  				//Calculate luma with these values
	
	float	max_color = max(origcolor.r, max(origcolor.g,origcolor.b)); 	//Find the strongest color
	float	min_color = min(origcolor.r, min(origcolor.g,origcolor.b)); 	//Find the weakest color

	float	color_saturation = max_color - min_color; 						//Saturation is the difference between min and max

	float	luma = dot(lumCoeff, origcolor.rgb); 							//Calculate luma (grey)

	if (C_VIBRANCE==true)
	{	
		res.rgb = lerp(luma, origcolor.rgb, (1.0 + (Vibrance * (1.0 - (sign(Vibrance) * color_saturation))))); 	//Extrapolate between luma and original by 1 + (1-saturation) - current
	}
	
	if (C_VIBRANCE==false)
	{
		res.rgb = origcolor.rgb;
	}	
	
	res.w=1.0;
	return res;
}

float4 PS_ProcessContrast(VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
{
	float ContrastCurve = lerp(ContrastCurveNightExt, ContrastCurveDayExt, ENightDayFactor);
	if (EInteriorFactor) 
	{
		ContrastCurve = lerp(ContrastCurveNightInt, ContrastCurveDayInt, ENightDayFactor);
	};			
	
	float4	res;
	float3	origcolor=tex2D(SamplerColor2, IN.txcoord.xy);
	float3	lumCoeff = float3(0.212656, 0.715158, 0.072186);  	//Calculate luma with these values
	
	float luma = dot(lumCoeff, origcolor.rgb);
	float3 chroma = origcolor.rgb - luma;
	
	float Curves_contrast_blend = ContrastCurve;
	float PI = 3.1415926535897932384626433832795; 
	
	float x = luma; 											//If the curve should be applied to Luma
  
	x = x - 0.5;
	x = x / ((abs(x)*1.25) + 0.375 ) + 0.5;
	
	x = lerp(luma, x, Curves_contrast_blend);					//if the curve should be applied to both Luma and Chroma
		
	if (C_CONTRASTCURVES==true)
	{	
		res.rgb = x + chroma; 										//Blend by Curves_contrast
	}
	
	if (C_CONTRASTCURVES==false)
	{
		res.rgb = origcolor.rgb;
	}	
  
	res.w=1.0;
/*
	if (Letterbox==true)
	{
      	if( IN.txcoord.y > 1.0 - fLetterboxBarHeight || IN.txcoord.y  < fLetterboxBarHeight )
      	{
        	return float4(0.0, 0.0, 0.0, 0.0);	//Black, with zero transparency
      	};
	}
*/
	return res;
}





		
float4 PS_ProcessAfterFX(VS_OUTPUT_POST IN) : COLOR
{
	float4 color		= tex2D(SamplerColor2, IN.txcoord.xy);
	
	if (use_kyoeffect==true) {
		float4 coord=0.0;
		coord.xy=IN.txcoord.xy;

		float4 origcolor=color;

		float KBrightness = lerp( lerp( KBrightnessNight, KBrightnessDay, ENightDayFactor), KBrightnessInt, EInteriorFactor);

		float NoiseMixCurve = lerp( lerp( NoiseMixCurveNight, NoiseMixCurveDay, ENightDayFactor), NoiseMixCurveInt, EInteriorFactor);

		//black-white filter
		//origcolor.xyz=dot(origcolor.xyz, GrayFilter.xyz);
		//MIDHRAS : add comment to line above to regain colour but keep TV noise.
		//scale
		origcolor.xyz*=KBrightness;
		//limit
		origcolor.xyz=clamp(origcolor.xyz, ClampLow, ClampHigh);


		//noise
		coord.xy=IN.txcoord.xy*ScreenSize.y*4000.0;
		coord.y+=frac(Timer.x * 140000.0);
		float4 noisebig=tex2D(SamplerNoise, coord);
		float mixfact=noisebig.x;
		mixfact=saturate((mixfact-0.5)*5.0);

		coord.xy=IN.txcoord.xy*ScreenSize.x*0.008;
		coord.x+=frac((noisebig.y)*frac(Timer.x*100000.0)*1.3);
		coord.y+=frac(Timer.x*160000.0);
		float4 noisecolor=tex2D(SamplerNoise, coord);
		noisecolor.w=lerp(noisecolor.x, noisecolor.y, mixfact);


		//mix gray with noise
		mixfact=dot(origcolor.xyz, 2.133);
		mixfact=pow(saturate(NoiseMixMultiplier*mixfact), NoiseMixCurve);
		noisecolor.x=noisecolor.w*AdditiveNoiseFactor;
		noisecolor.w=lerp(MultiplicativeNoiseMin, MultiplicativeNoiseMax, noisecolor.w);

		if (K_BlacknessLevels==true) {
		color.xyz=lerp(origcolor.xyz*noisecolor.w+noisecolor.x, origcolor.xyz, mixfact);
		}

		if (K_BlacknessLevels==false) {
		color.xyz=origcolor.rgb;
		}
	}
	
	    if (Vignette==true) {

		float EVignetteAmount = lerp (lerp (EVignetteAmountNight, EVignetteAmountDay, ENightDayFactor), EVignetteAmountInterior, EInteriorFactor);
		float EVignetteRadius = lerp (lerp (EVignetteRadiusNight, EVignetteRadiusDay, ENightDayFactor), EVignetteRadiusInterior, EInteriorFactor);
		float EVignetteCurve  = lerp (lerp (EVignetteCurveNight, EVignetteCurveDay, ENightDayFactor), EVignetteCurveInterior, EInteriorFactor);
		float4 origcolor=color;

		float2	uv=(IN.txcoord.xy-0.5)*EVignetteRadius;
		float	vignette=saturate(dot(uv.xy, uv.xy));
		vignette=pow(vignette, EVignetteCurve);

		color.xyz=lerp(origcolor.xyz, EVignetteColor, vignette*EVignetteAmount);

	    }



	if (use_noise==true)
		{
		float GrainTimerSeed 		= Timer.x * GrainMotion;
		float2 GrainTexCoordSeed 	= IN.txcoord.xy * 1.0;
		
		//Generate grain seeds
		float2 GrainSeed1 	= GrainTexCoordSeed + float2( 0.0, GrainTimerSeed );
		float2 GrainSeed2 	= GrainTexCoordSeed + float2( GrainTimerSeed, 0.0 );
		float2 GrainSeed3 	= GrainTexCoordSeed + float2( GrainTimerSeed, GrainTimerSeed );
		
		//Generate pseudo random noise
		float GrainNoise1 	= random( GrainSeed1 );
		float GrainNoise2 	= random( GrainSeed2 );
		float GrainNoise3 	= random( GrainSeed3 );
		float GrainNoise4 	= ( GrainNoise1 + GrainNoise2 + GrainNoise3 ) * 0.333333333;
		
		//Combine results
		float3 GrainNoise 	= float3( GrainNoise4, GrainNoise4, GrainNoise4 );
		float3 GrainColor 	= float3( GrainNoise1, GrainNoise2, GrainNoise3 );
		
		//Add noise to color
		color.xyz 			+= ( lerp( GrainNoise, GrainColor, GrainSaturation ) * GrainIntensity ) - ( GrainIntensity * 0.5);
		}
	
	if (use_letterbox==true)
		{
			float offset 	= letterbox_size * 0.01;
			if (IN.txcoord.y <= offset || IN.txcoord.y >= (1.0 - offset)) color.xyzw = 0.0;
		}
	
	color.w				= 1.0f;
	return color;
}

///////////////////////
//	  TECHNIQUES	 //
///////////////////////

technique PostProcess
{
	pass P0
	{
		VertexShader = compile vs_3_0 VS_PostProcess();
		PixelShader  = compile ps_3_0 PS_ProcessGaussianH();

		DitherEnable=FALSE;
		ZEnable=FALSE;
		CullMode=NONE;
		ALPHATESTENABLE=FALSE;
		SEPARATEALPHABLENDENABLE=FALSE;
		AlphaBlendEnable=FALSE;
		StencilEnable=FALSE;
		FogEnable=FALSE;
		SRGBWRITEENABLE=FALSE;
	}
}

technique PostProcess2
{
	pass P0
	{
		VertexShader = compile vs_3_0 VS_PostProcess();
		PixelShader  = compile ps_3_0 PS_ProcessGaussianV();

		DitherEnable=FALSE;
		ZEnable=FALSE;
		CullMode=NONE;
		ALPHATESTENABLE=FALSE;
		SEPARATEALPHABLENDENABLE=FALSE;
		AlphaBlendEnable=FALSE;
		StencilEnable=FALSE;
		FogEnable=FALSE;
		SRGBWRITEENABLE=FALSE;
	}
}

technique PostProcess3
{
	pass P0
	{
		VertexShader = compile vs_3_0 VS_PostProcess();
		PixelShader  = compile ps_3_0 PS_ProcessEdges();

		DitherEnable=FALSE;
		ZEnable=FALSE;
		CullMode=NONE;
		ALPHATESTENABLE=FALSE;
		SEPARATEALPHABLENDENABLE=FALSE;
		AlphaBlendEnable=FALSE;
		StencilEnable=FALSE;
		FogEnable=FALSE;
		SRGBWRITEENABLE=FALSE;
	}
}

technique PostProcess4
{
	pass P0
	{
		VertexShader = compile vs_3_0 VS_PostProcess();
		PixelShader  = compile ps_3_0 PS_ProcessSharpen1();

		DitherEnable=FALSE;
		ZEnable=FALSE;
		CullMode=NONE;
		ALPHATESTENABLE=FALSE;
		SEPARATEALPHABLENDENABLE=FALSE;
		AlphaBlendEnable=FALSE;
		StencilEnable=FALSE;
		FogEnable=FALSE;
		SRGBWRITEENABLE=FALSE;
	}
}

technique PostProcess5
{
	pass P0
	{
		VertexShader = compile vs_3_0 VS_PostProcess();
		PixelShader  = compile ps_3_0 PS_ProcessSharpen2();

		DitherEnable=FALSE;
		ZEnable=FALSE;
		CullMode=NONE;
		ALPHATESTENABLE=FALSE;
		SEPARATEALPHABLENDENABLE=FALSE;
		AlphaBlendEnable=FALSE;
		StencilEnable=FALSE;
		FogEnable=FALSE;
		SRGBWRITEENABLE=FALSE;
	}
}

technique PostProcess6
{
	pass P0
	{
		VertexShader = compile vs_3_0 VS_PostProcess();
		PixelShader  = compile ps_3_0 PS_ProcessAfterFX();

		DitherEnable=FALSE;
		ZEnable=FALSE;
		CullMode=NONE;
		ALPHATESTENABLE=FALSE;
		SEPARATEALPHABLENDENABLE=FALSE;
		AlphaBlendEnable=FALSE;
		StencilEnable=FALSE;
		FogEnable=FALSE;
		SRGBWRITEENABLE=FALSE;
	}
}



technique PostProcess7
{
	pass P0
	{
		VertexShader = compile vs_3_0 VS_PostProcess();
		PixelShader  = compile ps_3_0 PS_ProcessVibrance();

		DitherEnable=FALSE;
		ZEnable=FALSE;
		CullMode=NONE;
		ALPHATESTENABLE=FALSE;
		SEPARATEALPHABLENDENABLE=FALSE;
		AlphaBlendEnable=FALSE;
		StencilEnable=FALSE;
		FogEnable=FALSE;
		SRGBWRITEENABLE=FALSE;
	}
}

technique PostProcess8
{
	pass P0
	{
		VertexShader = compile vs_3_0 VS_PostProcess();
		PixelShader  = compile ps_3_0 PS_ProcessContrast();

		DitherEnable=FALSE;
		ZEnable=FALSE;
		CullMode=NONE;
		ALPHATESTENABLE=FALSE;
		SEPARATEALPHABLENDENABLE=FALSE;
		AlphaBlendEnable=FALSE;
		StencilEnable=FALSE;
		FogEnable=FALSE;
		SRGBWRITEENABLE=FALSE;
	}
}
_________________
| i5 3350p @3.1 | 16 GB RAM | GTX1060 | Skyrim on SSD |
My Flickr
My Soundcloud
CGI ENB

Offline
*sensei*
Posts: 372
Joined: 28 Jul 2013, 23:26

Re: Multipass sharpening via effect.txt [revision 1.2]

well, nice.. only comment is that the better solution is to replace K ENB code by levels control, and port levels, contrast stuff and vibrancy to enbeffect.fx and let effect.txt deal with sharpening, noise and letterbox. BUT if you really want to keep this in effect.txt make sure that AfterFX is the last PS in chain, not Vibrance/Contrast. Also know that both Vibrance and Contrast will fight with the sharpening shader since they both work on making dot product of RGB (this luma thing you see) for their use and Sharpening works by increasing contrasts of contrast edges (so this influences this dot product used by the other effects), so when you start to increase sharpening you probably have to retweak those again as well or may start to look ugly for no reason, and you'll never get the intended look of the effects no matter what you'll do.

Contrast and Vibrancy in their current form would perfectly allow themselves to be ported to enbeffect.fx...

Offline
User avatar
*sensei*
Posts: 446
Joined: 17 Apr 2014, 22:12
Location: Schweden

Re: Multipass sharpening via effect.txt [revision 1.2]

Hm I've always used LDR effects as touch up effects works in Photoshop. And the reason I wanted vibrance and contrast (which AFAIK are copied from SweetFX) in effect.txt was the DNI opportunity. It's probably the wrong place to place these codes but I'm far too used to it now.
Besides my whole config is like total anarchy where I've just pasted stuff for fun. :P I would bet that everything inside my files are going against any optimal guidance for how to set up proper shaders.

My first version had your post fx pass applied last. Don't know why I didnt do that this time... :?
Thanks for feedback mate! :)
_________________
| i5 3350p @3.1 | 16 GB RAM | GTX1060 | Skyrim on SSD |
My Flickr
My Soundcloud
CGI ENB
Post Reply