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;
-- 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 );
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 );
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
Same image with depth testing. Much more clean
Have fun.
prod80