enbbloom.fx for SKYRIM ENB 254+

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

enbbloom.fx for SKYRIM ENB 254+

Hi all,

Here, new bloom shader for Skyrim. Latest rework (anyone who used my shader before, this is latest and entirely different)

Features;
* Bloom applied based on depth (bloom width)
* Gaussian blur Sigma (width) available in GUI going from 13 wide to 301 wide (169 to 90601 taps - Sigma 1.2 to 64). Yep that's pretty damn wide
* Automatic calculation of Gaussian weights
* Selectable quality level
* Depth testing on bloom that foreground doesn't bloom into (far) background
* Configurable high pass filter using Levels controls to control bloom texture (where to bloom and by how much)
* Configurable bloom texture selection and controls
* Saturation control for the people adding bloom after ApplyGameColorCorrection (which is not the right place, it should be before)
* Options to scale bloom width with resolution (ie when using SuperSampling resolutions)
* 3 Bloom tinting methods; Regular (1), Original Texture based (2), Combination of both (3)
* Everything in GUI, no manual editing of file

Some minor explanation;
-- SuperSampling should be used when you are actually doing SuperSampling, it's not the same as for instance Reflection or SSAO/IL SuperSampling of ENB.
-- Depth/Far Depth/Min Depth;
Image

-- Quality; 0=high 1=medium 2=low
-- Levels;
- Black Level: limit bloom in dark area's
- Gamma curve: curve the response of bloom (limit or emphasize mid tones)
- White Level: blow out to white earlier
- Black Cutoff: spray bloom into dark area's
- White Cutoff: limit white output to reduce blown out whites
-- Sigma: Increase or decrease bloom width
-- Saturation: reduce saturation of bloom
-- Intensities: Increase intensities at different stages of the shader
-- Texture selection: determine which textures to use
-- Texture filtering, upscale low res textures to final output resolution (512x512)
-- Noise

Only works on ENB Binary 254+

enbeffect.fx should just do;

Code: Select all

float3 xcolorbloom = tex2D(_s3, _v0.xy).xyz;
color.xyz += ( xcolorbloom.xyz * EBloomAmount );
or for a bit more limited bloom do;

Code: Select all

float3 xcolorbloom = tex2D(_s3, _v0.xy).xyz;
color.xyz *= ( 1 - saturate( xcolorbloom.xyz )); //darken base pixel if bloom intensity very high
color.xyz += ( xcolorbloom.xyz * EBloomAmount );
NOTHING ELSE (for bloom of course - just to be clear on that).

If doing that causes problems even after setting up the file, you probably adding bloom on the wrong place in the shader. The right place to add bloom is before the ApplyGameColorCorrections if you use without the use of vanilla adaptation (god why use ENB and vanilla adaptation at the same time!?), or before any effects that alter color in general (saturation, contrast, etc). If for some reason you want to add bloom at end of shader or at one point in the middle of shader then you may need additional controls in enbeffect.fx, but I assume you know what you're doing and can handle that situation.

This shader can go extremely wide, doesn't mean you have to as it will cost you FPS. In normal use (say Sigma 6-10) the performance is similar to the default enbbloom.fx file coming with ENB download @ quality level=0

Examples
Bloom without depth testing. Notice how the trees bloom into the sky and pollutes it
Image

Same image with depth testing. Much more clean
Image

Have fun.
prod80
Attachments
enbbloom.fx.ini
(2.14 KiB) Downloaded 1346 times
enbbloom.fx
(30.73 KiB) Downloaded 1448 times
Last edited by prod80 on 08 Mar 2015, 15:08, edited 6 times in total.

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

Re: enbbloom.fx for SKYRIM ENB 254+

Updated bloom shader
Better SuperSampling estimation of scale so also resolution scales which are non-linear are properly supported. Gives better performance when SuperSampling is used.

Offline
Posts: 40
Joined: 12 Feb 2013, 22:38
Location: Britain

Re: enbbloom.fx for SKYRIM ENB 254+

Tried it in New Vegas, there's a very large difference between this and the default bloom, and the tint changes when I edit it in-game, so I'm gonna go ahead and say it works for that game too. Good job.

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

Re: enbbloom.fx for SKYRIM ENB 254+

It cant work for that game because the depth sampler it uses is exclusive for Skyrim, unless Boris changed that.
ENB has a fallback mechanism if bloom not working it returns to a default internal setup...

Offline
Posts: 40
Joined: 12 Feb 2013, 22:38
Location: Britain

Re: enbbloom.fx for SKYRIM ENB 254+

I don't know any thing except here are some images with your bloom. Perhaps the depth sampler doesn't work. I presume the bloom code is in the enbbloom.fx file, so there'd be no bloom without it?
Anyway here I turned the bloom up to 1 so it shows up heavily:
Image
You can see I also changed the day tint for this experiment.
Here I changed the gamma curve from 1 to 2:
Image

Here I've closed the editor. Notice the green tint to the mountain top shadows?
Image
Again here on her hair and the colouring around the chest.
Image

So, in conclusion, something is working. I get the impression that Boris doesn't make completely separate d3d9.dll's anymore, just doesn't enable some stuff, but it's still there.

BTW I use it in my Skyrim enb too and get similar effects.

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

Re: enbbloom.fx for SKYRIM ENB 254+

odd that does appear to be working.
I guess depth sampler is added then as well. Good to know :) thanks, as I don't have the game myself so I can only validate for Skyrim

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

Re: enbbloom.fx for SKYRIM ENB 254+

Updated shader, massive performance gain

Offline
User avatar
*blah-blah-blah maniac*
Posts: 1498
Joined: 31 Mar 2012, 15:06
Location: France

Re: enbbloom.fx for SKYRIM ENB 254+

Thanx Bas !
Okay, now I have to port my other shaders from my own bloom right into yours.
I have to try that depth-based extravaganza of yours ;)
_________________
Lian Li PC011 Dynamic, Corsair AX 1500i PSU, i9 10850K @5.0 Ghz, Aorus Z490 Ultra, RTX3090 MSI Gaming X Trio, 32GB Corsair Vengeance Pro RGB RAM@3600, Corsair MP600 1TB NVME System Drive, 10 TB Storage, W10 Pro 64, Custom Hard Tubing Watercooling Loop

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

Re: enbbloom.fx for SKYRIM ENB 254+

Not sure how it will work on your setup David since you basically use bloom to paint your image.. If I'm not mistaking K ENB is nearly B&W without bloom (or at least used to). You're gonna need a buttload of saturation and stuff to get there :D


Oh I see now I accidentally removed saturation math from my shader but left GUI... better reupload

Edit: reuploaded shader, now with working saturation control

Oh and PS. You may want to remove the saturate() at the end of the prepass, tex1 & 2 passes since you probably use bloom to trigger ALF which may stop working due to saturate.

Offline
User avatar
*blah-blah-blah maniac*
Posts: 1498
Joined: 31 Mar 2012, 15:06
Location: France

Re: enbbloom.fx for SKYRIM ENB 254+

No worries, I'll fuck everything first, then I'll find my way around :D
More seriously, dpeasant's additions are the key to my bloom's saturation. I'll find a way to merge them in your masterpiece.
And yes, K is nothing without bloom, you're right.
_________________
Lian Li PC011 Dynamic, Corsair AX 1500i PSU, i9 10850K @5.0 Ghz, Aorus Z490 Ultra, RTX3090 MSI Gaming X Trio, 32GB Corsair Vengeance Pro RGB RAM@3600, Corsair MP600 1TB NVME System Drive, 10 TB Storage, W10 Pro 64, Custom Hard Tubing Watercooling Loop
Post Reply