Please use english language
It is currently 13 Dec 2017, 17:00

All times are UTC





Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: 15 Sep 2014, 23:54 
Offline
*sensei*

Joined: 28 Jul 2013, 23:26
Posts: 372
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:
float3 xcolorbloom = tex2D(_s3, _v0.xy).xyz;
color.xyz += ( xcolorbloom.xyz * EBloomAmount );

or for a bit more limited bloom do;
Code:
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 436 times
enbbloom.fx [30.73 KiB]
Downloaded 544 times


Last edited by prod80 on 08 Mar 2015, 15:08, edited 6 times in total.
Top
 Profile  
 
Tomoko
PostPosted: 13 Oct 2014, 23:35 
Offline
*sensei*

Joined: 28 Jul 2013, 23:26
Posts: 372
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.


Top
 Profile  
 
PostPosted: 14 Oct 2014, 18:08 
Offline

Joined: 12 Feb 2013, 22:38
Posts: 40
Location: Britain
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.


Top
 Profile  
 
PostPosted: 14 Oct 2014, 20:36 
Offline
*sensei*

Joined: 28 Jul 2013, 23:26
Posts: 372
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...


Top
 Profile  
 
PostPosted: 15 Oct 2014, 16:33 
Offline

Joined: 12 Feb 2013, 22:38
Posts: 40
Location: Britain
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.


Top
 Profile  
 
PostPosted: 15 Oct 2014, 18:40 
Offline
*sensei*

Joined: 28 Jul 2013, 23:26
Posts: 372
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


Top
 Profile  
 
PostPosted: 08 Feb 2015, 12:43 
Offline
*sensei*

Joined: 28 Jul 2013, 23:26
Posts: 372
Updated shader, massive performance gain


Top
 Profile  
 
PostPosted: 08 Feb 2015, 13:01 
Offline
*blah-blah-blah maniac*
User avatar

Joined: 31 Mar 2012, 15:06
Posts: 1439
Location: France
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 ;)

_________________
Obsidian 900D, AX1500i, i7 6850K@4.425 Ghz, MSI X99 Raider, SLI 2x1080Ti 11G VRAM, 32G RAM@3371, 950 Pro M2, 11 Tb HDDs, W10 Pro 64, Full Watercooling
Image
K ENB Pure Light SE
K ENB Pure Light
Kountervibe ENB
Kinematic ENB


Top
 Profile  
 
PostPosted: 08 Feb 2015, 13:14 
Offline
*sensei*

Joined: 28 Jul 2013, 23:26
Posts: 372
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.


Top
 Profile  
 
PostPosted: 08 Feb 2015, 14:35 
Offline
*blah-blah-blah maniac*
User avatar

Joined: 31 Mar 2012, 15:06
Posts: 1439
Location: France
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.

_________________
Obsidian 900D, AX1500i, i7 6850K@4.425 Ghz, MSI X99 Raider, SLI 2x1080Ti 11G VRAM, 32G RAM@3371, 950 Pro M2, 11 Tb HDDs, W10 Pro 64, Full Watercooling
Image
K ENB Pure Light SE
K ENB Pure Light
Kountervibe ENB
Kinematic ENB


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 20 posts ]  Go to page 1, 2  Next

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group