Is there a way to remove the blur from ENB shaders?

Post » Sun May 20, 2012 11:50 am

I finally found one I like a lot but it uses no FXAA injector so it has that slight blur to it like the other ENB shaders. Is there something I can do in any of the settings to fix this?
User avatar
Vicki Gunn
 
Posts: 3397
Joined: Thu Nov 23, 2006 9:59 am

Post » Sun May 20, 2012 5:05 am

ENB has no blur to it.
User avatar
Anna Watts
 
Posts: 3476
Joined: Sat Jun 17, 2006 8:31 pm

Post » Sat May 19, 2012 8:44 pm

I am not the first person to talk about this. It looks like there is a slight fog over everything. Like I should be wearing glasses when I play with it on.
User avatar
Taylrea Teodor
 
Posts: 3378
Joined: Sat Nov 18, 2006 12:20 am

Post » Sun May 20, 2012 4:01 am

Screenshot?
User avatar
JAY
 
Posts: 3433
Joined: Fri Sep 14, 2007 6:17 am

Post » Sun May 20, 2012 6:04 am

Post a pic.

Regardless, it's not from ENB. You're probably using FXAA.
User avatar
Laura
 
Posts: 3456
Joined: Sun Sep 10, 2006 7:11 am

Post » Sun May 20, 2012 10:12 am

What I notice about ENB is that it has this grey haze over everything. It kind of smudges everything up, makes things look gritty and kind of blurry at the same time. It looks really bad I think.

Not sure if that's what you mean.
User avatar
Jonathan Braz
 
Posts: 3459
Joined: Wed Aug 22, 2007 10:29 pm

Post » Sun May 20, 2012 12:17 pm

What I notice about ENB is that it has this grey haze over everything. It kind of smudges everything up, makes things look gritty and kind of blurry at the same time. It looks really bad I think.

Not sure if that's what you mean.

Exactly.
User avatar
Emma
 
Posts: 3287
Joined: Mon Aug 28, 2006 12:51 am

Post » Sun May 20, 2012 1:35 am

I think it has to do a lot with ambient occlusion. Try to turn it off in the enbseries.ini. It's possible it also has to do a bit with ENB in general. I use FXAA atm instead; it literally gives me 0 FPS-hit and I can tweak the color and bloom just right.

But my personal advice? Wait for CK to come out, then install weather mods. It will mean 0 FPS hit and I'm pretty sure we can get results even better looking than shaders tweaking weather settings. Weather mods would also be able to fix the extremely overdone HDR.
User avatar
Ross Zombie
 
Posts: 3328
Joined: Wed Jul 11, 2007 5:40 pm

Post » Sun May 20, 2012 11:24 am

I've tried at least 5 different ENB configs, plus a number of FXAA mods, and they all look at least a little blurry to me. It could be bloom or other effects, but I agree that they all seem to have a little extra blur.

Enhanced Shader FX (which is a good ENB config on it's own), has a set of optional files. I'd suggest using the effects.fx file under UHQ sharpen. I tweaked the values to be a little higher than default, but less than the extra sharp file. (I'm not at home, so I don't remember the exact names).

I carry over the sharpen effect file for every ENB config.
User avatar
DarkGypsy
 
Posts: 3309
Joined: Tue Jan 23, 2007 11:32 am

Post » Sat May 19, 2012 11:51 pm

I've tried at least 5 different ENB configs, plus a number of FXAA mods, and they all look at least a little blurry to me. It could be bloom or other effects, but I agree that they all seem to have a little extra blur.

Enhanced Shader FX (which is a good ENB config on it's own), has a set of optional files. I'd suggest using the effects.fx file under UHQ sharpen. I tweaked the values to be a little higher than default, but less than the extra sharp file. (I'm not at home, so I don't remember the exact names).

I carry over the sharpen effect file for every ENB config.

When you get home would you mind sending me a link and also your personal settings for the sharpness?
User avatar
carley moss
 
Posts: 3331
Joined: Tue Jun 20, 2006 5:05 pm

Post » Sun May 20, 2012 1:48 am

Easy. Go to enbseries ini and reduce bloom amount (you can adjust by day or night)
User avatar
Sarah Knight
 
Posts: 3416
Joined: Mon Jun 19, 2006 5:02 am

Post » Sun May 20, 2012 2:15 am

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.fx
POSTPROCESS 3 // 3 and 5 definitely work, others might

enbeffectprepass.fx
float 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.
User avatar
Tina Tupou
 
Posts: 3487
Joined: Fri Mar 09, 2007 4:37 pm


Return to V - Skyrim