Page 1 of 1

Palette for dx11 versions of the mod (SkyrimSE, Fallout4)

Posted: 17 Jan 2017, 07:48
by ENBSeries
This modification of default shader file allow to create palette similar to old versions of the mod

Open enbeffect.fx with any text editor and put this at very beginning of the file:

Code: Select all

Texture2D PaletteTexture
<
	string UIName = "Palette texture";
	string ResourceName = "enbpalette.bmp";
>;
Find this string:

Code: Select all

#ifdef E_CC_PROCEDURAL
and in empty line before it insert this code (check //UNCOMMENT THIS FOR FALLOUT 4):

Code: Select all

{
	//float	grayadaptation=TextureAdaptation.Sample(Sampler0, IN.txcoord0.xy).x; //UNCOMMENT THIS FOR FALLOUT 4
	color.rgb=saturate(color.rgb);
	float3	brightness=grayadaptation;//adaptation luminance
	brightness=(brightness.x/(brightness.x+1.0));//new version
	float3	palette;
	float4	uvsrc=0.0;
	uvsrc.y=brightness.r;
	uvsrc.x=color.r;
	palette.r=PaletteTexture.Sample(Sampler1, uvsrc).r;
	uvsrc.x=color.g;
	uvsrc.y=brightness.g;
	palette.g=PaletteTexture.Sample(Sampler1, uvsrc).g;
	uvsrc.x=color.b;
	uvsrc.y=brightness.b;
	palette.b=PaletteTexture.Sample(Sampler1, uvsrc).b;
	color.rgb=palette.rgb;
}
Then create enbpalette.bmp file and place to game folder

Re: Palette for dx11 versions of the mod (SkyrimSE, Fallout4

Posted: 17 Jan 2017, 21:06
by Marcel_SVK
hm... I try it many times but I have this error message

Image

Image

Re: Palette for dx11 versions of the mod (SkyrimSE, Fallout4

Posted: 17 Jan 2017, 21:22
by kingeric1992
@Marcel_SVK

He means the other #ifdef E_CC_PROCEDURAL, that followed by

Code: Select all

#ifdef E_CC_PROCEDURAL
	//activated by UseProceduralCorrection=true
	float	tempgray;
	float4	tempvar;
	float3	tempcolor;

Re: Palette for dx11 versions of the mod (SkyrimSE, Fallout4

Posted: 18 Jan 2017, 13:19
by Marcel_SVK
Now it works. Thank you