[Fallout 4] Gaussian and gaussian-like bloom
Posted: 31 Aug 2016, 21:35
I've put together an alternate shader for bloom based on this article by Intel. It's a bit blurrier than the one in ENB with a slightly lower performance cost... I think. This is the first time I've made something like this, so I'm not sure if I've done anything wrong. (Or anything right.) In particular, I'm still not sure if I did the render targets correctly.
The new shader has two techniques - a blur with 5 iterations on the 1024 render target (as specified in the article), and a blur that does the 5 iterations to each render target like the original code and averages them. They're basically equivalent to the single-pass blur and multi-pass blur present in the default shader.
Grab it from here; http://pastebin.com/zRUJZz9T
EDIT: Updated to remove some extraneous passes.
In-game example | Bloom only example
A few notes...
I'm not sure about the pixel size code and I'm not sure I've set it correctly in the shader, so the values are a little fudged.
I didn't add a prepass... sorry! It shouldn't be too hard to add one, just change the first technique to point to a copy of the bloom function with the things you want in it. I don't use bloom-specific colour tweaking myself, so I never bothered.
An alternative to adding bloom is using a lerp function. It avoids problems like the Institute elevator pretty well, but it's a bit harder to balance.
Please test it out and tell me what you think.
The new shader has two techniques - a blur with 5 iterations on the 1024 render target (as specified in the article), and a blur that does the 5 iterations to each render target like the original code and averages them. They're basically equivalent to the single-pass blur and multi-pass blur present in the default shader.
Grab it from here; http://pastebin.com/zRUJZz9T
EDIT: Updated to remove some extraneous passes.
In-game example | Bloom only example
A few notes...
I'm not sure about the pixel size code and I'm not sure I've set it correctly in the shader, so the values are a little fudged.
I didn't add a prepass... sorry! It shouldn't be too hard to add one, just change the first technique to point to a copy of the bloom function with the things you want in it. I don't use bloom-specific colour tweaking myself, so I never bothered.
An alternative to adding bloom is using a lerp function. It avoids problems like the Institute elevator pretty well, but it's a bit harder to balance.
Please test it out and tell me what you think.