Skyrim

Adding Palette Slots

This process depends entirely on which ENB you use, but for most of the ones I've used the process is as described for Snapdragon (below). Rudy is a special case, covered at the end. If your ENB does not already have LUT support, I don't know how to add it. Good luck if you attempt that!


For Snapdragon (and similar)

I have 45 LUTs loaded in Snapdragon right now so this works ... it works too well. But hey. Any ENB where the enbeffect.fx looks like this below should be a similar process.

First, go to skyrim\enbseries\ and make a backup of enbeffect.fx, just in case. Second, choose your palette file (let's say - Technoir Boosted) and copy it to this same directory, \skyrim\enbseries\. Then open enbeffect.fx with a text editor - Notepad, Notepad++, Atom, Sublime, Vim...whatever.

Scroll down towards the bottom and look for something like this:


// additional lut15

texture2D lutnametex15 <string ResourceName= "Custom_LUT3.bmp" ; >;
sampler2D lutname15 = sampler_state {
Texture= < lutnametex15 >;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE; // LINEAR;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture=FALSE;
MaxMipLevel=0;
MipMapLodBias=0;
};

technique PASSNAME15 <string UIName= "Custom 3" ;>
{
pass p0
{
VertexShader = compile vs_3_0 VS_Quad();
PixelShader = compile ps_3_0 PS_D6EC7DD1( lutname15 );

ColorWriteEnable=ALPHA|RED|GREEN|BLUE;
ZEnable=FALSE;
ZWriteEnable=FALSE;
CullMode=NONE;
AlphaTestEnable=FALSE;
AlphaBlendEnable=FALSE;
SRGBWRITEENABLE=FALSE;

}
}

Copy and paste this entire section (from YOUR enbeffect.fx, not this quote -- ONLY use this quote as a reference) at the bottom of enbeffect.fx. Now you have to change a few things so it's a new custom slot instead of a copy of an old one.

All the things you have to change are in bold green, and it's pretty straightforward: Any reference to 15 (in this example) should be changed to 16 or 17 and so on, going up one number per extra custom slot you add. The filename, Custom_LUT3.bmp, should be changed to whatever palette file you copied into this folder at the start. The UIName is what shows up when you open the ENB menu ingame, so just name that whatever you want.

The trick is making sure you have the formatting correct (don't forget those {} marks) and you catch everything you need to change. For anyone who's ever programmed anything this should be really straightforward, you just need to be detail oriented.

A finished example looks like this. I'm using the filename "Custom_LUT6.bmp" for "Technoir Boosted."

// additional lut18

texture2D lutnametex18 <string ResourceName= "Custom_LUT6.bmp" ; >;
sampler2D lutname18 = sampler_state {
Texture= < lutnametex18 >;
MinFilter = LINEAR;
MagFilter = LINEAR;
MipFilter = NONE; // LINEAR;
AddressU = Clamp;
AddressV = Clamp;
SRGBTexture=FALSE;
MaxMipLevel=0;
MipMapLodBias=0;
};

technique PASSNAME18 <string UIName= "Technoir Boosted" ;>
{
pass p0
{
VertexShader = compile vs_3_0 VS_Quad();
PixelShader = compile ps_3_0 PS_D6EC7DD1( lutname18 );

ColorWriteEnable=ALPHA|RED|GREEN|BLUE;
ZEnable=FALSE;
ZWriteEnable=FALSE;
CullMode=NONE;
AlphaTestEnable=FALSE;
AlphaBlendEnable=FALSE;
SRGBWRITEENABLE=FALSE;

}
}


If you do it really wrong, Skyrim will crash on launch. Check your work and restore your original enbeffect.fx if you have to. If you do it only partially wrong, it may not apply the right palette when you choose it, your screen might go black, or the UI name will be wrong for whatever palette you apply. Always check carefully! And if you do it right, you can have a lot of palettes available at once.


For Rudy

Rudy makes adding custom LUTs kind of difficult; on the other hand it makes flipping through your installed LUTs really easy since rather than a drop-down menu where you have to pick, it uses something akin to a switch statement to let you flip through them rapidly. I am not as experienced with this but I did get it to work, so consider this one way that works and there may be others.

You have to make threechanges for Rudy. First, navigate to \enbseries\enbeffect.fx and make a backup copy.

Second, count how many LUTs you are going to add - Rudy needs an exact count. It comes with 6, and in this example I will only add one, so my total LUTs will be 7. Make sure to name your LUT file to LUT_7.bmp. (or LUT_8, LUT_9 ...)

1) In the LUT GUI section look for a line named "float UIMax" - it should read 6.0. Change this to 7.0 (this represents your number of LUTs, so it'll always be 7.0 or 8.0 or whatever)

float UIMax=7.0;



Make sure UIMin and UIStep are both 1.0, the default.


2) in the LUT HELPER section, we'll be loading a new texture. I don't know if it's required but I always name my files just like Rudy does, so the filename itself will be LUT_7.bmp.  Copy one of the existing LOAD_TEXTURE lines and paste it below the existing list, then modify it to match your number - I'm adding a 7th LUT so I change both numbers to 7:

LOAD_TEXTURE( LUT_7, LUT_7.bmp, LINEAR, CLAMP );



Make sure you keep the spacing intact.

3) In the LUT SWITCH section, you need to add a new case. If you've ever written an if/else or a switch statement this ought to be pretty straightforward. We added a 7th LUT to the UI in the first step, the loader in the second, now we need to tell Rudy how to handle it when we pick it. Copy one of the existing if statements entirely, from "if (LUT..." to the closing } and paste it at the end. It'll look like this:

if (LUTSwitch==7) {
color.rgb = CLutFunc(color.rgb, SamplerLUT_7);
}

All done, save and launch Skyrim and attempt to switch to LUT #7. It should work. Make sure it isn't just loading the default LUT, #1 - that's the fallback if something is wrong. If it is, carefully check all three steps; Rudy is a lot less tolerant of errors.


What about other ENBs?

Don't know, haven't tried. If they already support LUTs the answer is almost certainly yes, but I can't really help with something I don't use! You'll have to adapt the process based on what you've got.

Special Edition should be no different than LE - palettes work in both if the ENB supports it.

Many thanks to TheDaedricDoll for pushing me into figuring out Rudy (and being patient when I got it wrong), Tetrodoxin for introducing me to the idea of custom LUTs with Snapdragon, TheZeroKing for doing it just differently enough in Wyrmslayer I had to understand why things worked and not just how to copy and paste ;)

Article information

Added on

Edited on

Written by

ssDNA