When you get home would you mind sending me a link and also your personal settings for the sharpness?
If you want more info, we can PM, but for now:
Some of these files will conflict between different ENB configs, so you have to mix and match to the best of your ability. Certain settings such as
EBlurSamplingRange will be at odds with the sharpening effect, but it depends on the particular configs you're working with.
You need at least these files (plus ENB):
Skyrim/common.fxh
effect.txt
technique.fxh
Skyrim/Data/shaders/sharpen.fxh
Values to look out for:enbeffect.fxPOSTPROCESS 3 // 3 and 5 definitely work, others might
enbeffectprepass.fxfloat EBlurSamplingRange=4.0; // higher values = more blur
effect.txt Spoiler
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Sharpen
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Ultra high quality (sharper) preset
#define ESHARPENING
#define ESHARPENINGCOLOR
#define ENOISE
#define SamplingRange 0.5
#define SharpeningAmount 2.0 // probably want values between 0.5 - 4.5
#define ScanLineRepeat 0.5
#include "Data/shaders/sharpen.fxh"
sharpen.fxh Spoiler
//==================================================================
// Sharpen filter originally by Boris Vorontsov (http://enbdev.com)
//==================================================================
#include "common.fxh"
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Configuration flags
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
/*
= Configuration suggestions =
Default:
#define ESHARPENING
#define ESHARPENINGCOLOR
#define ENOISE
Sharper:
#define ESHARPENING
#define ESHARPENINGCOLOR
#define ENOISE
#define SamplingRange 0.5
#define SharpeningAmount 4.5
Ultra high quality:
#define ESHARPENING
#define ESHARPENINGCOLOR
#define ENOISE
#define SamplingRange 0.5
#define SharpeningAmount 1.5
#define ScanLineRepeat 0.5
Ultra high quality (sharper):
#define ESHARPENING
#define ESHARPENINGCOLOR
#define ENOISE
#define SamplingRange 0.5
#define SharpeningAmount 4.5
#define ScanLineRepeat 0.5
*/
// DO NOT CHANGE THESE HERE, CHANGE THEM IN effect.txt
// Enable blurring, useless, never enable
// #define EBLURRING
// Enable sharpening
// #define ESHARPENING
// If defined, color sharpen, otherwise sharp by gray
// #define ESHARPENINGCOLOR
// Enable noise in dark areas
// #define ENOISE
// Sharpen constants:
// Sharpening or blurring range
#ifndef SamplingRange
#define SamplingRange 0.4
#endif
#ifndef SharpeningAmount
#define SharpeningAmount 2.5
#endif
#ifndef ScanLineAmount
#define ScanLineAmount 0.0
#endif
#ifndef ScanLineRepeat
#define ScanLineRepeat 1.0
#endif
#ifndef NoiseAmount
#define NoiseAmount 0.1
#endif
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Post-processing pixel shader
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
float4 PS_Sharpen(VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
{
float4 res;
float4 coord=0.0;
coord.xy=IN.txcoord.xy;
float4 origcolor;
coord.w=0.0;
origcolor=tex2Dlod(SamplerColor, coord);
// coord.x=IN.txcoord.x-(1.5/ScreenSize);
// float4 lshift=tex2Dlod(SamplerColor, coord);
// coord.x=IN.txcoord.x+(1.5/ScreenSize);
// float4 rshift=tex2Dlod(SamplerColor, coord);
float2 offset[8]=
{
float2(1.0, 1.0),
float2(-1.0, -1.0),
float2(-1.0, 1.0),
float2(1.0, -1.0),
float2(1.41, 0.0),
float2(-1.41, 0.0),
float2(0.0, 1.41),
float2(0.0, -1.41)
};
int i=0;
float4 tcol=origcolor;
float invscreensize=1.0/ScreenSize;
//for (i=0; i<8; i++) //higher quality
for (i=0; i<4; i++)
{
float2 tdir=offset[i].xy;
coord.xy=IN.txcoord.xy+tdir.xy*invscreensize*SamplingRange;//*1.0;
float4 ct=tex2Dlod(SamplerColor, coord);
tcol+=ct;
}
tcol*=0.2; // 1.0/(4+1)
//tcol*=0.111; // 1.0/(8+1) //higher quality
/*
//not interesting
#ifdef EBLURRING
//blur
res=tcol;
#endif
*/
//sharp
#ifdef ESHARPENING
#ifdef ESHARPENINGCOLOR
//color
res=origcolor*(1.0+((origcolor-tcol)*SharpeningAmount));
#else
//non color
float difffact=dot((origcolor.xyz-tcol.xyz), 0.333);
res=origcolor*(1.0+difffact*SharpeningAmount);
#endif
//less sharpening for bright pixels
float rgray=origcolor.z; //blue fit well
//float rgray=max(origcolor.x, max(origcolor.y, origcolor.z));
rgray=pow(rgray, 3.0);
res=lerp(res, origcolor, saturate(rgray));
#endif
//grain noise
#ifdef ENOISE
float origgray=max(res.x, res.y);//dot(res.xyz, 0.333);
origgray=max(origgray, res.z);
coord.xy=IN.txcoord.xy*16.0 + origgray;
float4 cnoi=tex2Dlod(SamplerNoise, coord);
res=lerp(res, (cnoi.x+0.5)*res, NoiseAmount*saturate(1.0-origgray*1.8));
#endif
res.w=1.0;
return res;
}
#define SHADER PS_Sharpen
#include "technique.fxh"
common.fxh Spoiler
#ifndef COMMON
#define COMMON
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Textures and samplers
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
texture2D texColor;
sampler2D SamplerColor = sampler_state
{
Texture = ;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
texture2D texNoise;
sampler2D SamplerNoise = sampler_state
{
Texture = ;
MinFilter = POINT;
MagFilter = POINT;
MipFilter = NONE;
AddressU = Wrap;
AddressV = Wrap;
SRGBTexture = FALSE;
MaxMipLevel = 0;
MipMapLodBias = 0;
};
// Legacy
texture2D texBloom;
sampler2D SamplerBloom = sampler_state
{
Texture = ;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = LINEAR;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture = FALSE;
};
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Structures
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
struct VS_OUTPUT_POST {
float4 vpos : POSITION;
float2 txcoord : TEXCOORD0;
};
struct VS_INPUT_POST {
float3 pos : POSITION;
float2 txcoord : TEXCOORD0;
};
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Externals
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Keyboard controlled variables
float4 tempF1;
float4 tempF2;
float4 tempF3;
// Display resolution
#ifdef ENB100
// Compatibility mode with previous versions - size and scaley are still individual variables
float ScreenSize;
float ScreenScaleY;
#define ScreenWidth ScreenSize
#define ScreenWidthInv (1.0 / ScreenWidth)
#define ScreenScaleYInv (1.0 / ScreenScaleY)
#else
// Newer versions use a single vector
float4 ScreenSize;
#define ScreenWidth ScreenSize.x
#define ScreenWidthInv ScreenSize.y
#define ScreenScaleY ScreenSize.z
#define ScreenScaleYInv ScreenSize.w
#endif
// All versions: definitions for easier access
#define ScreenHeight (ScreenWidth / ScreenScaleY)
#define ScreenHeightInv (ScreenScaleY / ScreenWidth)
#define ScreenRect float2(ScreenWidth, ScreenHeight)
// Color of the screen with time dependent inertia
float4 ScreenBrightness;
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Legacy externals
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// I don't know if these actually do anything, but I included them regardless
// (-10..10) For bloom it controls how much to dark in the night or when scene is dark (user defined constant factor)
float ScreenBrightnessAdaptation;
// (0..10) Actually used for bloom, but may be useful here (user defined constant factor)
float bloomPower;
// (0 or 1) If bloom enabled by user
float useBloom;
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Pass-through vertex shader
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
VS_OUTPUT_POST VS_Passthrough(VS_INPUT_POST IN)
{
VS_OUTPUT_POST OUT;
OUT.vpos = float4(IN.pos, 1);
OUT.txcoord = IN.txcoord;
return OUT;
}
#endif
technique.fxh Spoiler
// Each sucessive technique has an increasing name
#ifndef TECH
#define TECH(n) PostProcess##n
#define NEXT 1
#endif
// The technique itself, relies on pre-set SHADER macro
#if NEXT == 1
technique PostProcess
#else
technique TECH(NEXT)
#endif
{
pass p1
{
VertexShader = compile vs_3_0 VS_Passthrough();
PixelShader = compile ps_3_0 SHADER();
DitherEnable = FALSE;
ZEnable = FALSE;
CullMode = NONE;
ALPHATESTENABLE = FALSE;
SEPARATEALPHABLENDENABLE = FALSE;
AlphaBlendEnable = FALSE;
StencilEnable = FALSE;
FogEnable = FALSE;
SRGBWRITEENABLE = FALSE;
}
}
// Increase the NEXT as needed (very clunky macro method)
#if NEXT == 1
#define NEXT 2
#elif NEXT == 2
#define NEXT 3
#elif NEXT == 3
#define NEXT 4
#elif NEXT == 4
#define NEXT 5
#elif NEXT == 5
#define NEXT 6
#elif NEXT == 6
#define NEXT 7
#elif NEXT == 7
#define NEXT 8
#elif NEXT == 8
#define NEXT 9
#elif NEXT == 9
#define NEXT 10
#elif NEXT == 10
#define NEXT 11
#elif NEXT == 11
#define NEXT 12
#elif NEXT == 12
#define NEXT 13
#elif NEXT == 13
#define NEXT 14
#elif NEXT == 14
#define NEXT 15
#elif NEXT == 15
#define NEXT 16
#elif NEXT == 16
#define NEXT 17
#elif NEXT == 17
#define NEXT 18
#elif NEXT == 18
#define NEXT 19
#elif NEXT == 19
#define NEXT 20
#elif NEXT == 20
#define NEXT 21
#elif NEXT == 21
#define NEXT 22
#elif NEXT == 22
#define NEXT 23
#endif
EDIT: I tweaked a couple of values and a comment after some quick testing. I've tested with Confident ENB and HD6 Cinematic Lighting. The sharpen files & settings are included in Skyrim Enhanced Shaders.