@Boris
that is actually what i ment, i thought if you put the code in one file it would be processed in one go,
but now i read your answer i think that it does not work this way.
because they are loose shader files they automatically do multiple passes, am i right ?
for it to work as single pass you would probably need to write all shader functions in one piece of code.
like one big function with parameters so you can enable/disable different effects within that single function.
i wanted to ask you another thing, we can configure DOF and all kinds of other features by external (text/script) shader files,
is this also the case for shadow configuration or is that hardcoded into the dll ?
or are there some parameters that can be controlled with an external file ?
@Tapioks
i have it like this, my effect.txt;
Code: Select all
#include "common.fxh"
// Enable just AA
#define USE_ANTI_ALIASING 1
#define FXAA_QUALITY__PRESET 6
float fxaaQualitySubpix = 0.3885;
float fxaaQualityEdgeThreshold = 0.1515;
float fxaaQualityEdgeThresholdMin = 0.0545;
#include "enbseries\fxaa2.fxh"
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Natural Colors
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Chromatic adaptation: (makes all tones more neutral)
#define EADAPTATION
// The target white point (0-10, higher = more blue)
// If default is too blue, try 4, if it's too red, try 6
#define WHITEPOINT 5
// Saturation controls: (Uncomment the #define to enable them)
// 0 is grayscale, 1 is normal, higher values = more saturated
#define SATURATION 1.1
// Load the effect
#include "enbseries\naturalcolors.fxh"
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Sharpen
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Default preset
#define ESHARPENING
#define ESHARPENINGCOLOR
#define ENOISE
#include "enbseries\sharpen.fxh"
#include "technique.fxh"
common.fxh and technique.fxh in root dir together with dll and effect.txt and shader files in enbseries dir.
Also took out the includes to common/technique.fxh files out of the shader files in the enbseries dir.
i thought it was the most elegant solution.
and like Boris said, you do not want to include those common and technique over and over again in each shader so i do that in effect.txt.