Jump to content


Photo

Modular Shader Library for ENBSeries [Skyrim]

enbseries skyrim fallout

  • Please log in to reply
7 replies to this topic

#1 JawZ

JawZ

    Thane

  • Mod Authors
  • PipPipPipPipPipPip
  • 390 posts

Posted 12 November 2015 - 10:47 PM

INTRODUCTION
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.


FEATURES
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
Currently only effects for enbeffect.fx, enbbloom.fx and effect.txt

List of effects

ENBSeries Game Color-Correction effect, also known as APPLYGAMECOLORCORRECTION

ENBSeries Post-Process methods, v1, v2, v3, v4

ENBSeries Palette

ENBSeries Procedural Color-Correction

ENBSeries FLIP TECHNQIUE

7 most common tone-mapping methods easily accessible from the GUI window "Technique" drop down menu

Bloom controls, control max white color and limit the appearance of bloom with a threshold

Fully customizable ENBSeries AGCC code, allows you to customize the Imagespaces in game instead of in the Creation Kit

Local Reinhard tone-mapping combined with Filmic Unsharted2D tone-mapping

Night eye effect that does not need the Game Color-Correction to function, and is very small in size, few code rows.

Control of Shadows and Highlights

SweetFX Vibrance and Saturation controls

SweetFX Split Screen control

Clip Mode, to display over and underexposed colors

Ability to utilize the Dungeon feature implemented in ELE, to allow dungeon seperation for controls

Multiple helper functions such as Yxy, HSV, HSL color space conversion, Time and Location factors"control splitters", Average/percieved luminance calculations.

And more...




HOW TO INJECT EFFECTS

First you need to include the files into the enbeffect.fx, you do that with this code line;
NOTE1: elepHelpers.fxh and enbAGCC.fxh will be used for this example.
NOTE2: You will need to have the Modular Shader folder inside of the enbseries folder and all the files in it for this function
#include "/Modular Shaders/msHelpers.fxh" // This code line needs to be added after the register section inside enbeffect.fx
#include "/Modular Shaders/enbeffect/enbAGCC.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.rgb = enbAGCC(color, vadapt, vbloom); // This code line goes into the Pixel shader (PS_D6EC7DD1) after all initialization code is done
Like this;
float4 PS_D6EC7DD1(VS_OUTPUT_POST IN, float2 vPos : VPOS) : COLOR
{
// Initialize various variables used in this shader file
  float4 color   = 0.0;
  float4 _v0     = 0.0;
  _v0.xy         = IN.txcoord0.xy;        /// Texture coordinates
if (ENABLE_SPLITSCREEN==-2) color = tex2D(_s0, float2(_v0.x - fSplitPos / 2.0f, _v0.y));    /// ENBSeries color output, for Splitscreen only
else                        color = tex2D(_s0, _v0.xy);                                     /// ENBSeries color output, for regular color processing
  float4 vbloom  = tex2D(_s1, _v0.xy);    /// Vanilla bloom
  float4 vadapt  = tex2D(_s2, _v0.xy);    /// Vanilla adaptation
  float4 ebloom  = tex2D(_s3, _v0.xy);    /// ENBSeries bloom
  float4 eadapt  = tex2D(_s4, 0.5);       /// ENBSeries adaptation, xyz = average screen color, w = curved max screen color
  float4 Gcolor  = color;                 /// For use in split screen effect, unaltered ENBSeries render output
  float4 blurTex = tex2D(_s3, _v0.xy);    /// For use in Local Operators


// Main ENBSeries Post-Processing computations and injections
color.rgb = enbAGCC(color, vadapt, vbloom); // AGCC injection code line color.w = 1.0f; return color; }

 

 
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, add this code into the file;
// Add the below GUI annotation at the top of the file
bool ENABLE_AGCC <
string UIName = "Enable Game Post-Processing";
> = {true};

----

if (ENABLE_AGCC==true)
{
color.rgb = enbAGCC(color, vadapt, vbloom); // AGCC injection code line
}

DOWNLOAD

 


Edited by JawZ, 18 September 2016 - 08:39 AM.

  • 0

#2 TechAngel85

TechAngel85

    Akatosh

  • Administrators
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 11,454 posts

Posted 12 November 2015 - 11:09 PM

Awesome sauce!!! I'll add this to the ENB Guide that I've been neglecting.

#3 JawZ

JawZ

    Thane

  • Mod Authors
  • PipPipPipPipPipPip
  • 390 posts

Posted 12 November 2015 - 11:12 PM

Thought a bit of advertising here would be good for ENB newcomers to get a better hold on this than on Nexus and ENBDev ;)

Though I forgot that I had a experiment going on in the msAGCC.fxh file, which makes it not functional in it's current unfinished state. I will upload a an updated version later on.


  • 0

#4 JawZ

JawZ

    Thane

  • Mod Authors
  • PipPipPipPipPipPip
  • 390 posts

Posted 23 November 2015 - 06:55 AM

rev7 will be released momentarily, I just need to go ver it one last time to see that everything is at should be.
And I made a video on how you can go about switching ebtween the effects, and installation of this library as well as file requirments from the inital ENBSeries binary download.

 

And here is a installation video for the Modular Shader Library, I'm Swedish who don't get to talk much with other english speaking folks, so bare with me ;)

And the thumbnail pixelation is due the Bandicut Free version, the video in itself isn't however.


Edited by JawZ, 23 November 2015 - 06:56 AM.

  • 0

#5 TechAngel85

TechAngel85

    Akatosh

  • Administrators
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 11,454 posts

Posted 23 November 2015 - 10:31 AM

Nice! Glad you made that video. It shows just how easy it really is.



#6 JawZ

JawZ

    Thane

  • Mod Authors
  • PipPipPipPipPipPip
  • 390 posts

Posted 23 November 2015 - 10:48 AM

Yeah I figured it would become even more obvious how simple it really is to switch between the effects with a video than just plain text.

Next video, if all goes well, will cover how to customize a "empty" shader file with only the effects one wants in it, just to keep the file amount down and what not.


  • 0

#7 Aiyen

Aiyen

    Dragon King

  • Super Moderators
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 3,536 posts

Posted 23 November 2015 - 11:16 AM

nice looking... audio a bit low on my end.. not sure if that was the bandy thingy or what, but figured I would mention it. 



#8 JawZ

JawZ

    Thane

  • Mod Authors
  • PipPipPipPipPipPip
  • 390 posts

Posted 23 November 2015 - 02:57 PM

It's the recording in itself. Using my C920 cam mic, going to use my Blue Snowball next time.

My brother users it as I have yet to have a use for it. Bought it almost a year ago to make videos :P Much better audio quality and levels wit that mic.


Edited by JawZ, 23 November 2015 - 02:57 PM.

  • 0



Also tagged with one or more of these keywords: enbseries, skyrim, fallout

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users