I've taken JawZ's customized enbeffect.fx and further customized it. I've added MTichenor's HSV code extended it with day/night/interior adjustments. Merely learning from JawZ and applying it. Problem is, no settings has any effect. The code is almost a complete copy and paste of that found in SkyRealism - ENB Evolved. Like I said, I merely added the DNI adjustments.
I've tried the original and it works fine. But for some reason, after the adjustments, it doesn't work for mine. Gets a little weirder now: The total package has an effect on the scene. If I disable all post-processing, disable vanilla color correction (APPLYGAMECOLORCORRECTION), and enable HSV, the scene in-game changes. The problem is adjusting any of the settings has absolutely no effect. Nothing happens. Maybe someone who actually knows something about HLSL can see why. Here's the changes to the enbeffect.fx file I've made. (I'd post the whole thing, but there is a limit on the number of characters allowed per post):
Code:
// SECONDARY EFFECT ACTIVATION
#define VANILLA_ADAPTATION 1 // Enables vanilla adaptation settings.
#define VANILLA_BLOOM 0 // Enables intensity settings for the vanilla bloom.
#define ENB_ADAPTATION 0 // Enables ENB adaptation settings.
#define ENB_BLOOM 0 // Enables ENB bloom when APPLYGAMECOLORCORRECTION is enabled, 0 turns it off.
#define ENABLE_HSV 1 // Enable HSV color correction. See HSV Color Correction settings below.
#define KOLORIZER 0 // Adjusts the RGB values seperately, Red, Green and Blue + Magenta, Cyan and Yellow color
#define BLOOM_KOLORIZER 0 // With this enabled you can adjust the colors of the bloom.
#define HD6_COLOR_TWEAKS 0 // Enables a set of Contrast, Brightness and Saturation controls, with in-game adjustment.
#define HD6_BLOOM 0 // 1,2,3. 1 = Bloom Crisp - alternate crisp bloom, no hazey mud. 2 = Bloom Screen alternate bloom (using screen mode). 3 = Bloom Defuzz old weird serendipitous code to defuzz bloom.
#define HD6_BLOOM_NOBLACK 0 // HD6 bloom method 4 - remove black from bloom, not working very well as it brightens non-bloom surfaces as well.
#define PALETTE_MIXER 0 // Enable settings to adjust intensity of the enbpalette.bmp
#if (ENABLE_HSV == 1)
#define USE_HSV_SMOOTH 0 // Use smoothstep color controls for overall color control.
#define USE_HSV_CURVE 0 // Use power curve color controls for overall color control.
#define USE_HSV_EQUALIZER 0 // Use Color Equalizer system for specific color control.
// EXTERIOR Night, Day WARNING: Most users should ONLY change the fColorSaturationMult variable.
float2 fColorSaturationMultExt = float2(1.0, 1.0); // Controls the color saturation multiplier. Range: 0.0 (greyscale) to 2.0 (hypercolor).
float2 fColorSaturationModExt = float2(0.0, 0.0); // Controls the color saturation. Range: -1 to 1. Default: 0.0
float2 fColorSaturationCurveExt = float2(1.0, 1.0); // Controls the color saturation curve. Default: 1.0.
float2 fColorSaturationSmoothExt = float2(0.0, 0.0); // Controls the color saturation contrast. Default: 0.0.
float2 fColorIntensityMultExt = float2(1.0, 1.0); // Controls the color intensity multiplier. Default: 1.0
float2 fColorIntensityModExt = float2(0.0, 0.0); // Controls the color brightness. Range: -1 to 1. Default: 0.0
float2 fColorIntensityCurveExt = float2(1.0, 1.0); // Controls the color intensity curve. Default: 1.0
float2 fColorIntensitySmoothExt = float2(0.0, 0.0); // Controls the color intensity contrast. Default: 0.0.
float2 fColorHueMultExt = float2(1.0, 1.0); // Controls the color hue multiplier. Default: 1.0
float2 fColorHueModExt = float2(0.0, 0.0); // Controls the color hue. Range: -1 to 1. Default: 0.0
float2 fColorHueCurveExt = float2(1.0, 1.0); // Controls the color hue curve. Default: 1.0.
float2 fColorHueSmoothExt = float2(0.0, 0.0); // Controls the color hue contrast. Default: 0.0.
// INTERIOR Night, Day
float2 fColorSaturationMultInt = float2(1.0, 1.0);
float2 fColorSaturationModInt = float2(0.0, 0.0);
float2 fColorSaturationCurveInt = float2(1.0, 1.0);
float2 fColorSaturationSmoothInt = float2(0.0, 0.0);
float2 fColorIntensityMultInt = float2(1.0, 0.0);
float2 fColorIntensityModInt = float2(0.0, 0.0);
float2 fColorIntensityCurveInt = float2(1.0, 1.0);
float2 fColorIntensitySmoothInt = float2(0.0, 0.0);
float2 fColorHueMultInt = float2(1.0, 1.0);
float2 fColorHueModInt = float2(0.0, 0.0);
float2 fColorHueCurveInt = float2(1.0, 1.0);
float2 fColorHueSmoothInt = float2(0.0, 0.0);
// Adjust multiplier and modifier of specific color saturations. Default: 0.0
float fColorSaturationMultRed = 0.0;
float fColorSaturationMultOrange = 0.0;
float fColorSaturationMultYellow = 0.0;
float fColorSaturationMultGreen = 0.0;
float fColorSaturationMultCyan = 0.0;
float fColorSaturationMultBlue = 0.0;
float fColorSaturationMultMagenta = 0.0;
float fColorSaturationModRed = 0.0;
float fColorSaturationModOrange = 0.0;
float fColorSaturationModYellow = 0.0;
float fColorSaturationModGreen = 0.0;
float fColorSaturationModCyan = 0.0;
float fColorSaturationModBlue = 0.0;
float fColorSaturationModMagenta = 0.0;
#endif
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// EXTERNAL PARAMETERS BEGINS HERE, SHOULD NOT BE MODIFIED UNLESS YOU KNOW WHAT YOU ARE DOING!!!
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
float fHueRed = 0.0;
float fHueOrange = 0.08333333;
float fHueYellow = 0.16666667;
float fHueGreen = 0.33333333;
float fHueCyan = 0.5;
float fHueBlue = 0.66666667;
float fHueMagenta = 0.83333333;
float fHueRed2 = 1.0;
float ColorEqualizerMult(in float H) {
float SMult = 1.0;
SMult += fColorSaturationMultRed * (1.0 - min(1.0, abs((fHueRed - H) / (fHueRed - fHueOrange))));
SMult += fColorSaturationMultOrange * (1.0 - min(1.0, abs((fHueOrange - H) / (fHueOrange - fHueYellow))));
SMult += fColorSaturationMultYellow * (1.0 - min(1.0, abs((fHueYellow - H) / (fHueYellow - fHueGreen))));
SMult += fColorSaturationMultGreen * (1.0 - min(1.0, abs((fHueGreen - H) / (fHueGreen - fHueYellow))));
SMult += fColorSaturationMultCyan * (1.0 - min(1.0, abs((fHueCyan - H) / (fHueCyan - fHueGreen))));
SMult += fColorSaturationMultBlue * (1.0 - min(1.0, abs((fHueBlue - H) / (fHueBlue - fHueCyan))));
SMult += fColorSaturationMultMagenta * (1.0 - min(1.0, abs((fHueMagenta - H) / (fHueMagenta - fHueBlue))));
SMult += fColorSaturationMultRed * (1.0 - min(1.0, abs((fHueRed2 - H) / (fHueRed2 - fHueMagenta))));
return SMult;
}
float ColorEqualizerMod(in float H) {
float SMod = 0.0;
SMod += fColorSaturationModRed * (1.0 - min(1.0, abs((fHueRed - H) / (fHueRed - fHueOrange))));
SMod += fColorSaturationModOrange * (1.0 - min(1.0, abs((fHueOrange - H) / (fHueOrange - fHueYellow))));
SMod += fColorSaturationModYellow * (1.0 - min(1.0, abs((fHueYellow - H) / (fHueYellow - fHueGreen))));
SMod += fColorSaturationModGreen * (1.0 - min(1.0, abs((fHueGreen - H) / (fHueGreen - fHueYellow))));
SMod += fColorSaturationModCyan * (1.0 - min(1.0, abs((fHueCyan - H) / (fHueCyan - fHueGreen))));
SMod += fColorSaturationModBlue * (1.0 - min(1.0, abs((fHueBlue - H) / (fHueBlue - fHueCyan))));
SMod += fColorSaturationModMagenta * (1.0 - min(1.0, abs((fHueMagenta - H) / (fHueMagenta - fHueBlue))));
SMod += fColorSaturationModRed * (1.0 - min(1.0, abs((fHueRed2 - H) / (fHueRed2 - fHueMagenta))));
return SMod;
}
float3 HUEtoRGB(in float H) {
float R = abs(H * 6.0 - 3.0) - 1.0;
float G = 2.0 - abs(H * 6.0 - 2.0);
float B = 2.0 - abs(H * 6.0 - 4.0);
return saturate(float3(R,G,B));
}
float RGBCVtoHUE(in float3 RGB, in float C, in float V) {
float3 Delta = (V - RGB) / C;
Delta.rgb -= Delta.brg;
Delta.rgb += float3(2.0,4.0,6.0);
Delta.brg = step(V, RGB) * Delta.brg;
float H;
H = max(Delta.r, max(Delta.g, Delta.b));
return frac(H / 6.0);
}
float3 HSVtoRGB(in float3 HSV) {
float3 RGB = HUEtoRGB(HSV.x);
return ((RGB - 1) * HSV.y + 1) * HSV.z;
}
float3 RGBtoHSV(in float3 RGB) {
float3 HSV = 0.0;
HSV.z = max(RGB.r, max(RGB.g, RGB.b));
float M = min(RGB.r, min(RGB.g, RGB.b));
float C = HSV.z - M;
if (C != 0.0) {
HSV.x = RGBCVtoHUE(RGB, C, HSV.z);
HSV.y = C / HSV.z;
}
return HSV;
}
float random(in float2 uv) {
float2 noise = (frac(sin(dot(uv, float2(12.9898,78.233) * 2.0)) * 43758.5453));
return abs(noise.x + noise.y) * 0.5;
}
float smootherstep(float edge0, float edge1, float x) {
x = saturate((x - edge0)/(edge1 - edge0));
return x * x * (3 - 2 * x);
}
...
#if (ENABLE_HSV == 1)
float fColorHueSmooth = lerp(fColorHueSmoothInt.x, fColorHueSmoothInt.y, ENightDayFactor);
float fColorSaturationSmooth = lerp(fColorSaturationSmoothInt.x, fColorSaturationSmoothInt.y, ENightDayFactor);
float fColorIntensitySmooth = lerp(fColorIntensitySmoothInt.x, fColorIntensitySmoothInt.y, ENightDayFactor);
float fColorHueCurve = lerp(fColorHueCurveInt.x, fColorHueCurveInt.y, ENightDayFactor);
float fColorSaturationCurve = lerp(fColorSaturationCurveInt.x, fColorSaturationCurveInt.y, ENightDayFactor);
float fColorIntensityCurve = lerp(fColorIntensityCurveInt.x, fColorIntensityCurveInt.y, ENightDayFactor);
float fColorHueMult = lerp(fColorHueMultInt.x, fColorHueMultInt.y, ENightDayFactor);
float fColorSaturationMult = lerp(fColorSaturationMultInt.x, fColorSaturationMultInt.y, ENightDayFactor);
float fColorIntensityMult = lerp(fColorIntensityMultInt.x, fColorIntensityMultInt.y, ENightDayFactor);
float fColorHueMod = lerp(fColorHueModInt.x, fColorHueModInt.y, ENightDayFactor);
float fColorSaturationMod = lerp(fColorSaturationModInt.x, fColorSaturationModInt.y, ENightDayFactor);
float fColorIntensityMod = lerp(fColorIntensityModInt.x, fColorIntensityModInt.y, ENightDayFactor);
if (EInteriorFactor - 1) {
fColorHueSmooth = lerp(fColorHueSmoothExt.x, fColorHueSmoothExt.y, ENightDayFactor);
fColorSaturationSmooth = lerp(fColorSaturationSmoothExt.x, fColorSaturationSmoothExt.y, ENightDayFactor);
fColorExtensitySmooth = lerp(fColorExtensitySmoothExt.x, fColorExtensitySmoothExt.y, ENightDayFactor);
fColorHueCurve = lerp(fColorHueCurveExt.x, fColorHueCurveExt.y, ENightDayFactor);
fColorSaturationCurve = lerp(fColorSaturationCurveExt.x, fColorSaturationCurveExt.y, ENightDayFactor);
fColorExtensityCurve = lerp(fColorExtensityCurveExt.x, fColorExtensityCurveExt.y, ENightDayFactor);
fColorHueMult = lerp(fColorHueMultExt.x, fColorHueMultExt.y, ENightDayFactor);
fColorSaturationMult = lerp(fColorSaturationMultExt.x, fColorSaturationMultExt.y, ENightDayFactor);
fColorExtensityMult = lerp(fColorExtensityMultExt.x, fColorExtensityMultExt.y, ENightDayFactor);
fColorHueMod = lerp(fColorHueModExt.x, fColorHueModExt.y, ENightDayFactor);
fColorSaturationMod = lerp(fColorSaturationModExt.x, fColorSaturationModExt.y, ENightDayFactor);
fColorExtensityMod = lerp(fColorExtensityModExt.x, fColorExtensityModExt.y, ENightDayFactor);
};
float3 hsvcolor = RGBtoHSV(color.xyz);
hsvcolor.y = max(hsvcolor.y, 0.0);
hsvcolor.z = max(hsvcolor.z, 0.0);
#if (USE_HSV_SMOOTH == 1)
hsvcolor.x = lerp(hsvcolor.x, smoothstep(0.0, 1.0, hsvcolor.x), fColorHueSmooth);
hsvcolor.y = lerp(hsvcolor.y, smoothstep(0.0, 1.0, hsvcolor.y), fColorSaturationSmooth);
hsvcolor.z = lerp(hsvcolor.z, smoothstep(0.0, 1.0, hsvcolor.z), fColorIntensitySmooth);
#endif
#if (USE_HSV_CURVE == 1)
hsvcolor.x = pow(hsvcolor.x, fColorHueCurve);
hsvcolor.y = pow(hsvcolor.y, fColorSaturationCurve);
hsvcolor.z = pow(hsvcolor.z, fColorIntensityCurve);
#endif
hsvcolor.x = fColorHueMod + (fColorHueMult * hsvcolor.x);
hsvcolor.y = fColorSaturationMod + (fColorSaturationMult * hsvcolor.y);
hsvcolor.z = fColorIntensityMod + (fColorIntensityMult * hsvcolor.z);
#if (USE_HSV_EQUALIZER == 1)
hsvcolor.y = ColorEqualizerMod(hsvcolor.x) + (ColorEqualizerMult(hsvcolor.x) * hsvcolor.y);
#endif
hsvcolor.y = max(hsvcolor.y, 0.0);
hsvcolor.z = max(hsvcolor.z, 0.0);
color.xyz = HSVtoRGB(hsvcolor);
#endif
...
_oC0.w = 1.0;
_oC0.xyz = color.xyz;
return _oC0;
}
#if (ENB_FLIPTECHNIQUE == 0) // switch between vanilla and mine post processing
technique Shader_D6EC7DD1
#else
technique Shader_ORIGINALPOSTPROCESS
#endif
{
pass p0 {
VertexShader = compile vs_3_0 VS_Quad();
PixelShader = compile ps_3_0 PS_D6EC7DD1();
ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
ZEnable = FALSE;
ZWriteEnable = FALSE;
CullMode = NONE;
AlphaTestEnable = FALSE;
AlphaBlendEnable = FALSE;
SRGBWRITEENABLE = FALSE;
}
}
// original shader of post processing
#if (ENB_FLIPTECHNIQUE == 0)
technique Shader_ORIGINALPOSTPROCESS
#else
technique Shader_D6EC7DD1
#endif
{
pass p0 {
VertexShader = compile vs_3_0 VS_Quad();
PixelShader = asm {
ps_3_0
def c6, 0, 0, 0, 0
def c7, 0.212500006, 0.715399981, 0.0720999986, 1
dcl_texcoord v0.xy
dcl_2d s0
dcl_2d s1
dcl_2d s2
rcp r0.x, c2.y
texld r1, v0, s2
mul r0.yz, r1.xxyw, c1.y
rcp r0.w, r0.y
mul r0.z, r0.w, r0.z
texld r1, v0, s1
mul r1.xyz, r1, c1.y
dp3 r0.w, c7, r1
mul r1.w, r0.w, r0.z
mad r0.z, r0.z, r0.w, c7.w
rcp r0.z, r0.z
mad r0.x, r1.w, r0.x, c7.w
mul r0.x, r0.x, r1.w
mul r0.x, r0.z, r0.x
cmp r0.x, -r0.w, c6.x, r0.x
rcp r0.z, r0.w
mul r0.z, r0.z, r0.x
add_sat r0.x, -r0.x, c2.x
texld r2, v0, s0
mul r2.xyz, r2, c1.y
mul r2.xyz, r0.x, r2
mad r1.xyz, r1, r0.z, r2
dp3 r0.x, r1, c7
mov r1.w, c7.w
lrp r2, c3.x, r1, r0.x
mad r1, r0.x, c4, -r2
mad r1, c4.w, r1, r2
mad r1, c3.w, r1, -r0.y
mad r0, c3.z, r1, r0.y
add r1, -r0, c5
mad oC0, c5.w, r1, r0
};
ColorWriteEnable = ALPHA|RED|GREEN|BLUE;
ZEnable = FALSE;
ZWriteEnable = FALSE;
CullMode = NONE;
AlphaTestEnable = FALSE;
AlphaBlendEnable = FALSE;
SRGBWRITEENABLE = FALSE;
}
}