[F4/SSE] Natural Bloom 3.0

share shaders here
  • Author
  • Message
Offline
User avatar
*sensei*
Posts: 341
Joined: 27 Dec 2011, 21:33
Location: Poland, Gdańsk

Re: [Fallout 4] Natural Bloom

One more update, I'm pretty excited about that one, It looks like I again fixed most of the shader problems like the low resolution artifact on far away objects and the mip-mapping artefacts when there's a lot of bloom near the camera. I figured out that editing the techniques at the end of the shaders actually have a quite significant effect on the shader. For instance, it looks like the first pass can actually be forced to be rendered at higher resolution than 1024x1024. This fixes the artefacting on the distant object. Also, editing the last pass to have smaller rendering resolution seems to give much wider, nicer falloff, similar to the first version of the Natural bloom, except that this time it's made with Scale set only to 8, instead of 12 or 16. I don't know how much the performance is affected, didn't notice anything on my rig.

Original Techniques:

Code: Select all

//bloom example 1, draw in single pass, very performance heavy and low blurring range
technique11 SinglePassBloom <string UIName="Single pass bloom";>
{
	pass p0
	{
		SetVertexShader(CompileShader(vs_5_0, VS_Quad()));
		SetPixelShader(CompileShader(ps_5_0, PS_ExampleBloom1(TextureDownsampled, 1024.0, 1024.0)));
	}
}



//bloom example 2, draw using several techniques and several render targets
technique11 MultiPassBloom <string UIName="Multipass bloom"; string RenderTarget="RenderTarget1024";>
{
	pass p0
	{
		SetVertexShader(CompileShader(vs_5_0, VS_Quad()));
		SetPixelShader(CompileShader(ps_5_0, PS_ResizeFirst(TextureDownsampled, 1024.0, 1024.0)));
	}
}

technique11 MultiPassBloom1 <string RenderTarget="RenderTarget512";>
{
	pass p0
	{
		SetVertexShader(CompileShader(vs_5_0, VS_Quad()));
		SetPixelShader(CompileShader(ps_5_0, PS_ResizeFirst(TextureDownsampled, 1024.0, 512.0)));
	}
}

technique11 MultiPassBloom2 <string RenderTarget="RenderTarget256";>
{
	pass p0
	{
		SetVertexShader(CompileShader(vs_5_0, VS_Quad()));
		SetPixelShader(CompileShader(ps_5_0, PS_Resize(RenderTarget512, 512.0, 256.0)));
	}
}

technique11 MultiPassBloom3 <string RenderTarget="RenderTarget128";>
{
	pass p0
	{
		SetVertexShader(CompileShader(vs_5_0, VS_Quad()));
		SetPixelShader(CompileShader(ps_5_0, PS_Resize(RenderTarget256, 256.0, 128.0)));
	}
}

technique11 MultiPassBloom4 <string RenderTarget="RenderTarget64";>
{
	pass p0
	{
		SetVertexShader(CompileShader(vs_5_0, VS_Quad()));
		SetPixelShader(CompileShader(ps_5_0, PS_Resize(RenderTarget128, 128.0, 64.0)));
	}
}

technique11 MultiPassBloom5 <string RenderTarget="RenderTarget32";>
{
	pass p0
	{
		SetVertexShader(CompileShader(vs_5_0, VS_Quad()));
		SetPixelShader(CompileShader(ps_5_0, PS_Resize(RenderTarget64, 64.0, 32.0)));
	}
}
//in last pass output to bloom texture
technique11 MultiPassBloom6
{
	pass p0
	{
		SetVertexShader(CompileShader(vs_5_0, VS_Quad()));
		SetPixelShader(CompileShader(ps_5_0, PS_BloomMix()));
	}
}

Modified techniques:

Code: Select all

//bloom example 1, draw in single pass, very performance heavy and low blurring range
technique11 SinglePassBloom <string UIName="Single pass bloom";>
{
	pass p0
	{
		SetVertexShader(CompileShader(vs_5_0, VS_Quad()));
		SetPixelShader(CompileShader(ps_5_0, PS_ExampleBloom1(TextureDownsampled, 2048.0, 2048.0)));
	}
}



//bloom example 2, draw using several techniques and several render targets
technique11 MultiPassBloom <string UIName="Multipass bloom"; string RenderTarget="RenderTarget1024";>
{
	pass p0
	{
		SetVertexShader(CompileShader(vs_5_0, VS_Quad()));
		SetPixelShader(CompileShader(ps_5_0, PS_ResizeFirst(TextureDownsampled, 2048.0, 2048.0)));
	}
}

technique11 MultiPassBloom1 <string RenderTarget="RenderTarget512";>
{
	pass p0
	{
		SetVertexShader(CompileShader(vs_5_0, VS_Quad()));
		SetPixelShader(CompileShader(ps_5_0, PS_ResizeFirst(TextureDownsampled, 1024.0, 512.0)));
	}
}

technique11 MultiPassBloom2 <string RenderTarget="RenderTarget256";>
{
	pass p0
	{
		SetVertexShader(CompileShader(vs_5_0, VS_Quad()));
		SetPixelShader(CompileShader(ps_5_0, PS_Resize(RenderTarget512, 512.0, 256.0)));
	}
}

technique11 MultiPassBloom3 <string RenderTarget="RenderTarget128";>
{
	pass p0
	{
		SetVertexShader(CompileShader(vs_5_0, VS_Quad()));
		SetPixelShader(CompileShader(ps_5_0, PS_Resize(RenderTarget256, 256.0, 128.0)));
	}
}

technique11 MultiPassBloom4 <string RenderTarget="RenderTarget64";>
{
	pass p0
	{
		SetVertexShader(CompileShader(vs_5_0, VS_Quad()));
		SetPixelShader(CompileShader(ps_5_0, PS_Resize(RenderTarget128, 128.0, 64.0)));
	}
}

technique11 MultiPassBloom5 <string RenderTarget="RenderTarget32";>
{
	pass p0
	{
		SetVertexShader(CompileShader(vs_5_0, VS_Quad()));
		SetPixelShader(CompileShader(ps_5_0, PS_Resize(RenderTarget64, 32.0, 32.0)));
	}
}
//in last pass output to bloom texture
technique11 MultiPassBloom6
{
	pass p0
	{
		SetVertexShader(CompileShader(vs_5_0, VS_Quad()));
		SetPixelShader(CompileShader(ps_5_0, PS_BloomMix()));
	}
}
And some pics:

Image

Image

EDIT: I always forget that this forum doesn't autohide the code... :V
_________________
OS: Windows 10
CPU: AMD R5 3600
RAM: Corsair DDR4 16GB 3200MHz Vengeance
GPU: AMD Radeon 5700 XT
Sound Card: X-FI Titanium HD
Mobo: ASRock X370 Pro4
Monitor: M340CLZ 34" 3440x1440 100HZ AMD FREE Sync Curved Monitor

Offline
User avatar
Posts: 78
Joined: 08 Nov 2013, 07:42
Location: Taiwan

Re: [Fallout 4] Natural Bloom

Hi, could u release an update for Skyrim Special Edition (SSE) that would be great! :)
_________________
Observing the world with aesthetic taste.

Offline
User avatar
*sensei*
Posts: 341
Joined: 27 Dec 2011, 21:33
Location: Poland, Gdańsk

Re: [Fallout 4] Natural Bloom

abc75179778300 wrote:Hi, could u release an update for Skyrim Special Edition (SSE) that would be great! :)
I don't have SSE but I'm pretty sure that the file should work just fine, there shouldn't be any edits required.
_________________
OS: Windows 10
CPU: AMD R5 3600
RAM: Corsair DDR4 16GB 3200MHz Vengeance
GPU: AMD Radeon 5700 XT
Sound Card: X-FI Titanium HD
Mobo: ASRock X370 Pro4
Monitor: M340CLZ 34" 3440x1440 100HZ AMD FREE Sync Curved Monitor

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

Re: [Fallout 4] Natural Bloom

MaxG3D wrote:
abc75179778300 wrote:Hi, could u release an update for Skyrim Special Edition (SSE) that would be great! :)
I don't have SSE but I'm pretty sure that the file should work just fine, there shouldn't be any edits required.
It indeed works perfect. I added some pieces of code in it and made some personal modifications and it works wonders.
_________________
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
User avatar
*blah-blah-blah maniac*
Posts: 530
Joined: 30 Jan 2012, 13:18

Re: [Fallout 4] Natural Bloom

The resolution you specified there (1024 vs 2048) does not determine what resolution the tender target is, but it's instruction for blur pass. Doubling the specified texture size halves the projected texel width and therefore halves the blur width. Hence lowering the "resolution" in last pass raises blur width (because multiplied with 1/texsize).

Offline
User avatar
*sensei*
Posts: 341
Joined: 27 Dec 2011, 21:33
Location: Poland, Gdańsk

Re: [Fallout 4] Natural Bloom

Hey guys, another update, I have added Roxahris Gaussian/Kawase Bloom with the previous edits. I highly suggest using his Gauss bloom since it's much, much cheaper performance wise and capable of much wider blur. But please do note that the way it works is completely different to the old bloom and most likely you'll have to edit your previous bloom values.

Here are some quick shoots:

Image

Image

Image

Image

Image
_________________
OS: Windows 10
CPU: AMD R5 3600
RAM: Corsair DDR4 16GB 3200MHz Vengeance
GPU: AMD Radeon 5700 XT
Sound Card: X-FI Titanium HD
Mobo: ASRock X370 Pro4
Monitor: M340CLZ 34" 3440x1440 100HZ AMD FREE Sync Curved Monitor

Offline
User avatar
Posts: 18
Joined: 01 Dec 2016, 13:57

Re: [F4/SSE] Natural Bloom 3.0

I am new to the whole ENB thing and just looking at your shots in your main post it looks very attractive. So after I download and unzip the file do I just extract both bloom folder files or just pick one and take the contents of that folder and copy it over to the Skyrim SE game directory?

The files I see in Circular Bloom Folder:
  • enbbloom.fx
    enbbloom_2.0.fx


The files I see in Gaussian & Kawase Bloom:
  • enbloom folder - GaussBlur.h & KawaseBloom.h
    enbbloom.fx


My scope of ENB jargon is very limited as I am trying to learn as much as I can currently. Any assistance would be appreciated, thank you! :mrgreen:

Offline
User avatar
*sensei*
Posts: 341
Joined: 27 Dec 2011, 21:33
Location: Poland, Gdańsk

Re: [F4/SSE] Natural Bloom 3.0

Yeah, just copy one of the "enbbloom.fx" from one of the folders into Root folder of F4/SSE (or rename the "enbbloom_2.0.fx" to "enbbloom.fx" and use that one). After that, make sure to tweak your settings in the shaders window (Shift+enter to open the ENB menu, right side window, enbbloom.fx rollout)
_________________
OS: Windows 10
CPU: AMD R5 3600
RAM: Corsair DDR4 16GB 3200MHz Vengeance
GPU: AMD Radeon 5700 XT
Sound Card: X-FI Titanium HD
Mobo: ASRock X370 Pro4
Monitor: M340CLZ 34" 3440x1440 100HZ AMD FREE Sync Curved Monitor

Offline
User avatar
Posts: 18
Joined: 01 Dec 2016, 13:57

Re: [F4/SSE] Natural Bloom 3.0

MaxG3D wrote:tweak your settings in the shaders


Thank you very much for replying and assisting me. Any tweaking settings I should NOT adjust? I will do that tonight and see what happens. Dumb question (at least for you) what is a .h file? Is it the same as a .fx file? Should I pick the .h file and rename it before pasting it or just copy it as is into the game directory?

Offline
User avatar
*master*
Posts: 136
Joined: 08 Nov 2012, 15:24

Re: [F4/SSE] Natural Bloom 3.0

Ideally, don't tamper with the file structure unless you know what you're doing - and how to correct the problems you cause. The reason you should leave it as it is because the shader will have a line of code in it like...

Code: Select all

#include "enbbloom/GaussBlur2.h"
...points to that file, in that place. As such, the files in those folders are necessary - unless you've gone and made sure yourself nothing is pointing to them in the other files.

Remember, from the ENBseries GUI you can quickly reload your last settings by clicking the load button, so messing up isn't fatal. If the settings weren't meant to be altered, they wouldn't be alterable! ...Probably.
Post Reply