This thread was created to answer the most commonly asked questions about fakeHDR+AA (as tweaked by me)Reason for this threadThere were a lot of questions that seemed to be asked over, and over through the last threads.
This is my attempt to answer the most common ones as well as have a place for open discussion on the subject.
Also would love to hear what you've done with it, and see your screenshots.
Who made it possible?Timeslip created the original fake HDR mod.Shirosae wrote a different version of the .fx file for that mod.
Nicoroshi, Sir Drake, and many others tweaked that .fx file.
Who will it work for?(Oblivion specific)
Pretty much anyone who:
Owns a card that doesn't support the in game HDR.
Owns a card that doesn't support HDR+AA.
Who thinks the game's HDR is a little overdone, and would like to have control over how the effects are rendered.
What exactly is it?It's a post process shader that creates effects like the ones the 'in game' HDR does.
How do I change the effects to what I want?Shirosae gave a great explaination of the different lines in the .fx file he wrote which can be found
in this thread on page 6 post 116How do I install it?1. Go
>>>Here<<< , and download Timeslip's 'cut down version 1.2' (This is the version the code in the OP is written for).
2.Follow the installation instructions for that mod.
(Basically drop the d3d9.dll file in the Oblivion Directory (where the Oblivion.exe is located), and the fakeHDR.fx file in the Oblivion\Data\Shaders folder).
3. Open the fakeHDR.fx file with notepad. Right click\select all\delete.
4.Copy\Paste the code from the OP of this thread into that folder.
5. Play, and enjoy.
Important Notes: A.Be sure and uncomment the resolution in the code that you play the game in. (currently it's set for 1280x1024).
B.If using an ATI Graphics card please read Timeslip's readme for details regarding the ATT compatibility patch
How do I get rid of it if I don't like it?Delete the d3d9.dll file in Program Files\Bethesda Softworks\Oblivion, and the fakeHDR.fx file in Oblivion\Data\Shaders.
This will remove the mod.
Are there any drawbacks?Yes, but only a few.
1.FPS hit. How much seems to be highly system specific. You won't know for sure until you load it up, and try.
Most systems reported between 3-10 FPS difference between HDR, and Fake HDR+AA.
For those with really high FPS the hit was greater due to a 'soft framerate cap' explained by Shirosae here:
QUOTE
I think what's happening is: The Shader runs once per pixel, per frame.
So at high framerates (and yours certainly are), the shader is working MUCH more often than on my system, for example. Your high screen resolution just compounds the problem.
In effect, the shader causes a soft framerate cap. So yeah, you're right, the shader can only go so fast, because after a certain speed the system requirements to go faster get astronomical.
2.
Overbright vendor menu screens. (training, buy/sell, etc.)
ExampleExample Dark UI Mod3.
Iris effect affecting screen brightness while closing containers or exiting certain menus.(until the eye adjusts)
Note: The duration, and darkness of this is controlable in the .fx file.
ConclusionI hope this answers the questions of those who are trying this for the first time without the need to wade through almost 400 posts.
I'm still tweaking the .fx (a little), but believe I've gotten it close to where I'm happy with it.
Current changes to my version of the .fx1. Increased the vibrance of colors some.
2. Increased the amount of bloom effect.
3. Slowed down the iris effect a little to make it more noticable.
I've always liked the in game HDR, but found it to be overdone.
With this version I've decreased the amount to where
I feel it gives the effects without being overblown.
Tastes will vary so play with it until you're happy with it.Here is the .fx file for the cut down (trimmed) version of Timeslip's mod.
Be sure to uncomment the "static const float2 rcpres = " that matches your in game resolution
NOTE: THE CUT DOWN VERSION RUNS FASTERCODE
//These variables will get set automatically
texture tex1;
texture tex2;
//float2 rcpres;
float CurrentEye;
//float CurrentBrightness;
sampler s0 = sampler_state { AddressU = Clamp; AddressV = Clamp; texture = <tex1>; };
sampler s1 = sampler_state { texture = <tex2>; };
//Use these to modify the behaviour of the dll
bool SinglePixel=false;
bool AffectMenus=false;
int ToggleKey=107;
int ToggleSinglePixelKey=109;
int ToggleAffectMenusKey=106;
float ReactionSpeed=0.95;
//Current Settings
static const float BloomScale = 0.65;
static const float HDRScale = -0.38;
static const float HDRAdjust = -0.10;
//rcpres must be set to the reciprical of your screen resolution
//static const float2 rcpres = { 0.0015625, 0.0020833333333 }; //640x480
//static const float2 rcpres = { 0.00125, 0.0016666666667 }; //800x600
//static const float2 rcpres = { 0.0009765625, 0.0013020833 }; //1024x768
//static const float2 rcpres = { 0.000625, 0.0008333333333 }; //1600x1200
static const float2 rcpres = { 0.00078125, 0.0009765625 }; //1280x1024
float2 PixelKernelH[13] =
{
{ -6, 0 },
{ -5, 0 },
{ -4, 0 },
{ -3, 0 },
{ -2, 0 },
{ -1, 0 },
{ 0, 0 },
{ 1, 0 },
{ 2, 0 },
{ 3, 0 },
{ 4, 0 },
{ 5, 0 },
{ 6, 0 },
};
float2 PixelKernelV[13] =
{
{ 0, -6 },
{ 0, -5 },
{ 0, -4 },
{ 0, -3 },
{ 0, -2 },
{ 0, -1 },
{ 0, 0 },
{ 0, 1 },
{ 0, 2 },
{ 0, 3 },
{ 0, 4 },
{ 0, 5 },
{ 0, 6 },
};
static const float BlurWeights[13] =
{
0.002216,
0.008764,
0.026995,
0.064759,
0.120985,
0.176033,
0.199471,
0.176033,
0.120985,
0.064759,
0.026995,
0.008764,
0.002216,
};
float4 Bloom( in float2 Tex : TEXCOORD0 ) : COLOR0
{
float4 Color = tex2D( s0, Tex );
float tempHDRScale=(0.70*smoothstep(0.00,0.75,CurrentEye))+HDRScale;
float4 Color2=0;
for (int i = 0; i < 13; i++)
{
Color2 += tex2D( s1, Tex + (PixelKernelH[i]*rcpres) ) * BlurWeights[i];
Color2 += tex2D( s1, Tex + (PixelKernelV[i]*rcpres) ) * BlurWeights[i];
}
float4 Curvemod = (0.70*Color);
Color = clamp((0.30*Color)+((0.70-Curvemod+tempHDRScale)*pow(Color,2))+((Curvemod-tempHDRScale)*(1-pow((1-Color),2))),0,1);
Color2 *= (BloomScale-(0.00*CurrentEye));
return clamp(Color + Color2,0,1);
}
float4 HDRBrightPass( in float2 Tex : TEXCOORD0 ) : COLOR0
{
float4 color = tex2D( s0, Tex );
float tempbright = clamp((0.27*color[1])+(0.67*color[2])+(0.06*color[3]),0,1);
float HDRAdjustBias = (0.18*pow((1-CurrentEye),3));
float curvemod = (0.25*tempbright);
float4 colorbias = (1-pow((1-color),2));
float4 adjust = clamp(((color-CurrentEye)-HDRAdjust-(HDRAdjustBias)),0,1);
color = clamp((8*pow(adjust,5)),0,1);
//color += clamp(tex2D( s1, Tex ) - (2*(CurrentEye + 0.10)) ,0,0.75); //Uncomment this line for retina burn
color = clamp(((1-curvemod+HDRAdjustBias)*color)+((curvemod-HDRAdjustBias)*colorbias),0,1);
color.a = 1;
return color;
}
technique T0
{
pass p0 { PixelShader = compile ps_2_0 HDRBrightPass(); }
pass p1 { PixelShader = compile ps_2_0 Bloom(); }
}
Here are a couple of screenshots with the .fx file above.ImpDeerLava RiverMytic Dawn HideoutClannfear RuntSunsetRuinsSigridSince tastes vary.........
One of our members (Kekkonen) started a thread on
Digital Vibrance that works well with the fakeHDR mod to add more color.
Personally I like the setting at just above none to add more color, and vibrance without running into the problems of shadowed areas going black, and textureless by tweaking the HDRscale value too low.
Play with it, and find what works for you.