Palette for dx11 versions of the mod (SkyrimSE, Fallout4)
Posted: 17 Jan 2017, 07:48
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:
Find this string:
and in empty line before it insert this code (check //UNCOMMENT THIS FOR FALLOUT 4):
Then create enbpalette.bmp file and place to game folder
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";
>;
Code: Select all
#ifdef E_CC_PROCEDURAL
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;
}