Modular Shader Library for ENBSeries – Skyrim LE

From Skyrim Nexus Latest Files


While chatting with some folks at the STEP forum in the enbseries.ini guide, we, myself, Aiyen, Matso and TechAngel, agreed that it would be helpful to newcomers to the ENBSeries “world” to supply them with easy and highly configurable shader files. And that it had a clean look with good amount of info in them, letting the “reader” of the code see what each code line actually do to achieve that particular visual effect.

So I started whipping up my own shader library, borrowing the base template, sort of anyway, from Aiyen’s Skylight ENB.

This is however not an extension of Aiyen’s Skylight ENB preset, rather something totally different. A base code library for anyone to configure and expand how they see fit.


Highly customizable and easy customization and addition of various effects for the purpose of altering the visuals.

All ENBSeries default shader effects in easy accessible and injectable .fxh files

Entirely new effects, compared to what is available in the default ENBSeries shader files




First you need to include the files into the enbeffect.fx, you do that with this code line;

NOTE: msHelpers.fxh and AGCC.fxh will be used for this example.

    #include “/Modular Shaders/msHelpers.fxh”  // This code line needs to be added after the register section inside enbeffect.fx

    #include “/Modular Shaders/enbeffect/70_AGCC.fxh”

There, you have now successfully added/included the helper function library and the APPLYGAMECOLORCORRECTION effect library into your file.

Now you need to include it into the rendering stage so it will have an effect on the render output.

For that you need to add this code line for the AGCC code to take affect;

    color = msAGCC(color, IN.txcoord0.xy);  // This code line goes into the Pixel shader (PS_D6EC7DD1) after all initialization code is done

This is how it should look, after you added the above code row;

float4 PS_D6EC7DD1(VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR {

  float4 color  = tex2D(_s0, IN.txcoord0.xy);  // ENBSeries color output

  float4 vbloom = tex2D(_s1, IN.txcoord0.xy);  // Vanilla bloom

  float4 vadapt = tex2D(_s2, IN.txcoord0.xy);  // Vanilla adaptation

  float4 ebloom = tex2D(_s3, IN.txcoord0.xy);  // ENBSeries bloom

  float4 eadapt = tex2D(_s4, IN.txcoord0.xy);  // ENBSeries adaptation, xyz = average screen color, w = curved max screen color

// Main ENBSeries Post-Processing computations and injections

    color = msAGCC(color, IN.txcoord0.xy);  // AGCC injection code line


  color.w = 1.0;


Now you should see that the AGCC effect is active and in use after you have saved the enbeffect.fx file changes and in game you have pressed the <<<<<APPLY CHANGES>>>>> button found at the of the GUI window.

To make it so you can easily enable or disable the AGCC effect, alter the code so it looks like the below code segment;

// Add the below GUI annotation at the top of the file

    bool ENABLE_AGCC < string UIName=”Enable AGCC”;  string UIWidget=”Spinner”;  int UIMin=0; > = {true};


// Add the below code into the Pixel Shader (PS_Draw)

    color = lerp(color, msAGCC(color, IN.txcoord0.xy), ENABLE_AGCC);

Original URL:

Leave a Reply