enbbloom.fx for SKYRIM ENB 254+

share shaders here
  • Author
  • Message
Offline
User avatar
*sensei*
Posts: 316
Joined: 12 Aug 2013, 18:55
Location: Scotland

Re: enbbloom.fx for SKYRIM ENB 254+

Forgot about doing this, and after getting the sky looking good in Fallout 4, the need for depth bloom becomes eye-bleedingly obvious.

After changing the Samplers to the following:

Code: Select all

Texture2D TextureDepth;
Texture2D TextureDownsampled;
Texture2D texBloom2;
Texture2D texBloom3;
Texture2D texBloom4;
Texture2D texBloom5;
Texture2D texBloom6;
Texture2D texBloom7;//additional bloom tex
Texture2D texBloom8;//additional bloom tex

SamplerState SamplerDepth = sampler_state
{
	Texture   = <TextureDepth>;
	MinFilter = POINT;
	MagFilter = POINT;
	MipFilter = NONE;
	AddressU  = Clamp;
	AddressV  = Clamp;
	SRGBTexture=FALSE;
	MaxMipLevel=0;
	MipMapLodBias=0;
};

SamplerState SamplerBloom1 = sampler_state
{
    Texture   = <TextureDownsampled>;
	MinFilter = LINEAR;
	MagFilter = LINEAR;
	MipFilter = NONE;//NONE;
	AddressU  = Clamp;
	AddressV  = Clamp;
	SRGBTexture=FALSE;
	MaxMipLevel=0;
	MipMapLodBias=0;
};
I now get the following error: error X3086: DX-9 style 'LHS = <RHS>' syntax is deprecated in strict mode

The error is thrown for the first sampler, Texture = <TextureDepth>. Took a look at the default ENB bloom, and there is quite the difference in structure for the samplers.

Original ENB bloom:

Code: Select all

SamplerState		Sampler0
{
	Filter = MIN_MAG_MIP_POINT;
	AddressU = Clamp;
	AddressV = Clamp;
};
SamplerState		Sampler1
{
	Filter = MIN_MAG_MIP_LINEAR;
	AddressU = Clamp;
	AddressV = Clamp;
};
Edit1:

Changed the samplers to the following:

Code: Select all

SamplerState SamplerDepth
{
	Texture   = TextureDepth;
	MinFilter = POINT;
	MagFilter = POINT;
	MipFilter = NONE;
	AddressU  = Clamp;
	AddressV  = Clamp;
	SRGBTexture=FALSE;
	MaxMipLevel=0;
	MipMapLodBias=0;
};

SamplerState SamplerBloom1
{
    Texture   = TextureDownsampled;
	MinFilter = LINEAR;
	MagFilter = LINEAR;
	MipFilter = NONE;//NONE;
	AddressU  = Clamp;
	AddressV  = Clamp;
	SRGBTexture=FALSE;
	MaxMipLevel=0;
	MipMapLodBias=0;
};

SamplerState SamplerBloom2
{
    Texture   = texBloom2;
	MinFilter = LINEAR;
	MagFilter = LINEAR;
	MipFilter = NONE;//NONE;
	AddressU  = Clamp;
	AddressV  = Clamp;
	SRGBTexture=FALSE;
	MaxMipLevel=0;
	MipMapLodBias=0;
};

SamplerState SamplerBloom3
{
    Texture   = texBloom3;
	MinFilter = LINEAR;
	MagFilter = LINEAR;
	MipFilter = NONE;//NONE;
	AddressU  = Clamp;
	AddressV  = Clamp;
	SRGBTexture=FALSE;
	MaxMipLevel=0;
	MipMapLodBias=0;
};

SamplerState SamplerBloom4
{
    Texture   = texBloom4;
	MinFilter = LINEAR;
	MagFilter = LINEAR;
	MipFilter = NONE;//NONE;
	AddressU  = Clamp;
	AddressV  = Clamp;
	SRGBTexture=FALSE;
	MaxMipLevel=0;
	MipMapLodBias=0;
};

SamplerState SamplerBloom5
{
    Texture   = texBloom5;
	MinFilter = LINEAR;
	MagFilter = LINEAR;
	MipFilter = NONE;//NONE;
	AddressU  = Clamp;
	AddressV  = Clamp;
	SRGBTexture=FALSE;
	MaxMipLevel=0;
	MipMapLodBias=0;
};

SamplerState SamplerBloom6
{
    Texture   = texBloom6;
	MinFilter = LINEAR;
	MagFilter = LINEAR;
	MipFilter = NONE;//NONE;
	AddressU  = Clamp;
	AddressV  = Clamp;
	SRGBTexture=FALSE;
	MaxMipLevel=0;
	MipMapLodBias=0;
};

SamplerState SamplerBloom7
{
    Texture   = texBloom7;
	MinFilter = LINEAR;
	MagFilter = LINEAR;
	MipFilter = NONE;//NONE;
	AddressU  = Clamp;
	AddressV  = Clamp;
	SRGBTexture=FALSE;
	MaxMipLevel=0;
	MipMapLodBias=0;
};

SamplerState SamplerBloom8
{
    Texture   = texBloom8;
	MinFilter = LINEAR;
	MagFilter = LINEAR;
	MipFilter = NONE;//NONE;
	AddressU  = Clamp;
	AddressV  = Clamp;
	SRGBTexture=FALSE;
	MaxMipLevel=0;
	MipMapLodBias=0;
};
And I changed the techniques to the following:

Code: Select all

technique BloomPrePass
{
    pass p0
    {
		SetVertexShader(CompileShader(vs_5_0, VS_Bloom()));
		SetPixelShader(CompileShader(ps_5_0, PS_BloomPrePass()));

		ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
		CullMode = NONE;
		AlphaBlendEnable = FALSE;
		AlphaTestEnable = FALSE;
		SEPARATEALPHABLENDENABLE = FALSE;
		FogEnable = FALSE;
		SRGBWRITEENABLE = FALSE;
	}
}

technique BloomTexture1
{
    pass p0
    {
		SetVertexShader(CompileShader(vs_5_0, VS_Bloom()));
		SetPixelShader(CompileShader(ps_5_0, PS_BloomTexture1()));

		ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
		CullMode = NONE;
		AlphaBlendEnable = FALSE;
		AlphaTestEnable = FALSE;
		SEPARATEALPHABLENDENABLE = FALSE;
		FogEnable = FALSE;
		SRGBWRITEENABLE = FALSE;
	}
}

technique BloomTexture2
{
    pass p0
    {
		SetVertexShader(CompileShader(vs_5_0, VS_Bloom()));
		SetPixelShader(CompileShader(ps_5_0, PS_BloomTexture2()));

		ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
		CullMode = NONE;
		AlphaBlendEnable = FALSE;
		AlphaTestEnable = FALSE;
		SEPARATEALPHABLENDENABLE = FALSE;
		FogEnable = FALSE;
		SRGBWRITEENABLE = FALSE;
	}
}

technique BloomPostPass
{
    pass p0
    {
		SetVertexShader(CompileShader(vs_5_0, VS_Bloom()));
		SetPixelShader(CompileShader(ps_5_0, PS_BloomPostPass()));

		ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
		CullMode = NONE;
		AlphaBlendEnable = FALSE;
		AlphaTestEnable = FALSE;
		SEPARATEALPHABLENDENABLE = FALSE;
		FogEnable = FALSE;
		SRGBWRITEENABLE = FALSE;
	}
}
_________________
Intel i7 6700k | AMD Vega 56 8GB | 2x16GB DDR4 @ 3000mhz | Windows 7 64bit | Creative Soundblaster X-Fi Titanium Fatal1ty Pro | Asus z170 Pro Gaming

Offline
User avatar
*sensei*
Posts: 316
Joined: 12 Aug 2013, 18:55
Location: Scotland

Re: enbbloom.fx for SKYRIM ENB 254+

ENB threw a bunch of errors for the samplers again. Had to change the samplers to the following:

Code: Select all

SamplerState SamplerDepth
{
	Texture   = TextureDepth;
	FILTER = MIN_MAG_MIP_POINT;
	AddressU  = Clamp;
	AddressV  = Clamp;
	MAXLOD=0;
	MIPLODBIAS=0;
};

SamplerState SamplerBloom1
{
    Texture   = TextureDownsampled;
	FILTER = MIN_MAG_MIP_LINEAR;
	AddressU  = Clamp;
	AddressV  = Clamp;
	MAXLOD=0;
	MIPLODBIAS=0;
};

SamplerState SamplerBloom2
{
    Texture   = texBloom2;
	FILTER = MIN_MAG_MIP_LINEAR;
	AddressU  = Clamp;
	AddressV  = Clamp;
	MAXLOD=0;
	MIPLODBIAS=0;
};

SamplerState SamplerBloom3
{
    Texture   = texBloom3;
	FILTER = MIN_MAG_MIP_LINEAR;
	AddressU  = Clamp;
	AddressV  = Clamp;
	MAXLOD=0;
	MIPLODBIAS=0;
};

SamplerState SamplerBloom4
{
    Texture   = texBloom4;
	FILTER = MIN_MAG_MIP_LINEAR;
	AddressU  = Clamp;
	MAXLOD=0;
	MIPLODBIAS=0;
};

SamplerState SamplerBloom5
{
    Texture   = texBloom5;
	FILTER = MIN_MAG_MIP_LINEAR;
	AddressU  = Clamp;
	AddressV  = Clamp;
	MAXLOD=0;
	MIPLODBIAS=0;
};

SamplerState SamplerBloom6
{
    Texture   = texBloom6;
	FILTER = MIN_MAG_MIP_LINEAR;
	AddressU  = Clamp;
	AddressV  = Clamp;
	MAXLOD=0;
	MIPLODBIAS=0;
};

SamplerState SamplerBloom7
{
    Texture   = texBloom7;
	FILTER = MIN_MAG_MIP_LINEAR;
	AddressU  = Clamp;
	AddressV  = Clamp;
	MAXLOD=0;
	MIPLODBIAS=0;
};

SamplerState SamplerBloom8
{
    Texture   = texBloom8;
	FILTER = MIN_MAG_MIP_LINEAR;
	AddressU  = Clamp;
	AddressV  = Clamp;
	MAXLOD=0;
	MIPLODBIAS=0;
};
After that, no more errors are thrown and it compiles fine. But now, there's no bloom. It's not that the values are too small or anything, it's that there is literally no bloom being applied.

Here's the pastebin for the full .fx file: https://pastebin.com/L54Uw7az
_________________
Intel i7 6700k | AMD Vega 56 8GB | 2x16GB DDR4 @ 3000mhz | Windows 7 64bit | Creative Soundblaster X-Fi Titanium Fatal1ty Pro | Asus z170 Pro Gaming
Post Reply