Please use english language
It is currently 26 Feb 2020, 09:56

All times are UTC





Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: 19 Jul 2013, 15:39 
Offline

Joined: 22 Jan 2013, 01:10
Posts: 40
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;
    }
}


Top
 Profile  
 
Tomoko
PostPosted: 20 Jul 2013, 12:39 
Offline
*blah-blah-blah maniac*
User avatar

Joined: 05 Mar 2012, 02:08
Posts: 1938
I have already DN-IE separated the ENB Evolved 2.3 enbeffect.fx version ;)

And I'm doing a mini, mini update to all my files and will upload them all as soon as I have rooted out a issue I currently have with Skyrim.
http://skyrim.nexusmods.com/mods/36720/? - I'll upload them here first then to the link in my sig below.

Parts of Mticehnor's code needs more than just applying the DN-IE or DNI code it needs slight code addition/rewrite to function. I have covered every setting in that file with DN-IE.

I will take a look at your additions and show you what is causing it and why, later though as I needto take care of other things now.


Top
 Profile  
 
PostPosted: 20 Jul 2013, 14:32 
Offline

Joined: 22 Jan 2013, 01:10
Posts: 40
--JawZ-- wrote:
I have already DN-IE separated the ENB Evolved 2.3 enbeffect.fx version ;)

And I'm doing a mini, mini update to all my files and will upload them all as soon as I have rooted out a issue I currently have with Skyrim.
http://skyrim.nexusmods.com/mods/36720/? - I'll upload them here first then to the link in my sig below.

Parts of Mticehnor's code needs more than just applying the DN-IE or DNI code it needs slight code addition/rewrite to function. I have covered every setting in that file with DN-IE.

I will take a look at your additions and show you what is causing it and why, later though as I needto take care of other things now.


Awesome, JawZ! Thanks for your help. Explaining what is wrong with my attempt would be helpful for me to learn a little more about HLSL. I look forward to hearing more from you...


Top
 Profile  
 
PostPosted: 21 Jul 2013, 22:13 
Offline
*blah-blah-blah maniac*
User avatar

Joined: 05 Mar 2012, 02:08
Posts: 1938
Here are all my latest DN-IE files;
http://www.mediafire.com/download/hp3th ... ect.fx.zip

It should be a simple process of copy and pasting the codes you want.
If you run into trouble post the file and do not paste it! and I will look it over and locate the problem.


The part that needed to be changed in the HSV Equalizer code are these;

Your posted code;
Code:
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;
}

--------------------------------------------------------------------------------------------------------------------

#if (USE_HSV_EQUALIZER == 1)
   hsvcolor.y = ColorEqualizerMod(hsvcolor.x) + (ColorEqualizerMult(hsvcolor.x) * hsvcolor.y);
#endif



And how it should be written to function with DN-IE seperation;
Code:
float ColorEqualizerMult(in float H, in float JKNDF, in float JKIF )
{
   float SMult = 1.0;

   SMult += lerp(fColorSaturationMultRedExt.x * ( 1.0 - min( 1.0, abs( ( fHueRed - H ) / ( fHueRed - fHueOrange ) ) ) ), fColorSaturationMultRedExt.y * ( 1.0 - min( 1.0, abs( ( fHueRed - H ) / ( fHueRed - fHueOrange ) ) ) ), JKNDF);
   SMult += lerp(fColorSaturationMultOrangeExt.x * ( 1.0 - min( 1.0, abs( ( fHueOrange - H ) / ( fHueOrange - fHueYellow ) ) ) ), fColorSaturationMultOrangeExt.y * ( 1.0 - min( 1.0, abs( ( fHueOrange - H ) / ( fHueOrange - fHueYellow ) ) ) ), JKNDF);
   SMult += lerp(fColorSaturationMultYellowExt.x * ( 1.0 - min( 1.0, abs( ( fHueYellow - H ) / ( fHueYellow - fHueGreen ) ) ) ), fColorSaturationMultYellowExt.y * ( 1.0 - min( 1.0, abs( ( fHueYellow - H ) / ( fHueYellow - fHueGreen ) ) ) ), JKNDF);
   SMult += lerp(fColorSaturationMultGreenExt.x * ( 1.0 - min( 1.0, abs( ( fHueGreen - H ) / ( fHueGreen - fHueYellow ) ) ) ), fColorSaturationMultGreenExt.y * ( 1.0 - min( 1.0, abs( ( fHueGreen - H ) / ( fHueGreen - fHueYellow ) ) ) ), JKNDF);
   SMult += lerp(fColorSaturationMultCyanExt.x * ( 1.0 - min( 1.0, abs( ( fHueCyan - H ) / ( fHueCyan - fHueGreen ) ) ) ), fColorSaturationMultCyanExt.y * ( 1.0 - min( 1.0, abs( ( fHueCyan - H ) / ( fHueCyan - fHueGreen ) ) ) ), JKNDF);
   SMult += lerp(fColorSaturationMultBlueExt.x * ( 1.0 - min( 1.0, abs( ( fHueBlue - H ) / ( fHueBlue - fHueCyan ) ) ) ), fColorSaturationMultBlueExt.y * ( 1.0 - min( 1.0, abs( ( fHueBlue - H ) / ( fHueBlue - fHueCyan ) ) ) ), JKNDF);
   SMult += lerp(fColorSaturationMultMagentaExt.x * ( 1.0 - min( 1.0, abs( ( fHueMagenta - H ) / ( fHueMagenta - fHueBlue ) ) ) ), fColorSaturationMultMagentaExt.y * ( 1.0 - min( 1.0, abs( ( fHueMagenta - H ) / ( fHueMagenta - fHueBlue ) ) ) ), JKNDF);
   SMult += lerp(fColorSaturationMultRedExt.x * ( 1.0 - min( 1.0, abs( ( fHueRed2 - H ) / ( fHueRed2 - fHueMagenta ) ) ) ), fColorSaturationMultRedExt.y * ( 1.0 - min( 1.0, abs( ( fHueRed2 - H ) / ( fHueRed2 - fHueMagenta ) ) ) ), JKNDF);

   if ( JKIF > 0.5 ) {
   SMult += lerp(fColorSaturationMultRedInt.x * ( 1.0 - min( 1.0, abs( ( fHueRed - H ) / ( fHueRed - fHueOrange ) ) ) ), fColorSaturationMultRedInt.y * ( 1.0 - min( 1.0, abs( ( fHueRed - H ) / ( fHueRed - fHueOrange ) ) ) ), JKNDF);
   SMult += lerp(fColorSaturationMultOrangeInt.x * ( 1.0 - min( 1.0, abs( ( fHueOrange - H ) / ( fHueOrange - fHueYellow ) ) ) ), fColorSaturationMultOrangeInt.y * ( 1.0 - min( 1.0, abs( ( fHueOrange - H ) / ( fHueOrange - fHueYellow ) ) ) ), JKNDF);
   SMult += lerp(fColorSaturationMultYellowInt.x * ( 1.0 - min( 1.0, abs( ( fHueYellow - H ) / ( fHueYellow - fHueGreen ) ) ) ), fColorSaturationMultYellowInt.y * ( 1.0 - min( 1.0, abs( ( fHueYellow - H ) / ( fHueYellow - fHueGreen ) ) ) ), JKNDF);
   SMult += lerp(fColorSaturationMultGreenInt.x * ( 1.0 - min( 1.0, abs( ( fHueGreen - H ) / ( fHueGreen - fHueYellow ) ) ) ), fColorSaturationMultGreenInt.y * ( 1.0 - min( 1.0, abs( ( fHueGreen - H ) / ( fHueGreen - fHueYellow ) ) ) ), JKNDF);
   SMult += lerp(fColorSaturationMultCyanInt.x * ( 1.0 - min( 1.0, abs( ( fHueCyan - H ) / ( fHueCyan - fHueGreen ) ) ) ), fColorSaturationMultCyanInt.y * ( 1.0 - min( 1.0, abs( ( fHueCyan - H ) / ( fHueCyan - fHueGreen ) ) ) ), JKNDF);
   SMult += lerp(fColorSaturationMultBlueInt.x * ( 1.0 - min( 1.0, abs( ( fHueBlue - H ) / ( fHueBlue - fHueCyan ) ) ) ), fColorSaturationMultBlueInt.y * ( 1.0 - min( 1.0, abs( ( fHueBlue - H ) / ( fHueBlue - fHueCyan ) ) ) ), JKNDF);
   SMult += lerp(fColorSaturationMultMagentaInt.x * ( 1.0 - min( 1.0, abs( ( fHueMagenta - H ) / ( fHueMagenta - fHueBlue ) ) ) ), fColorSaturationMultMagentaInt.y * ( 1.0 - min( 1.0, abs( ( fHueMagenta - H ) / ( fHueMagenta - fHueBlue ) ) ) ), JKNDF);
   SMult += lerp(fColorSaturationMultRedInt.x * ( 1.0 - min( 1.0, abs( ( fHueRed2 - H ) / ( fHueRed2 - fHueMagenta ) ) ) ), fColorSaturationMultRedInt.y * ( 1.0 - min( 1.0, abs( ( fHueRed2 - H ) / ( fHueRed2 - fHueMagenta ) ) ) ), JKNDF);
   };
   return SMult;
}

float ColorEqualizerMod(in float H, in float JKNDF, in float JKIF)
{
   float SMod = 0.0;

   SMod += lerp(fColorSaturationModRedExt.x * ( 1.0 - min( 1.0, abs( ( fHueRed - H ) / ( fHueRed - fHueOrange ) ) ) ), fColorSaturationModRedExt.y * ( 1.0 - min( 1.0, abs( ( fHueRed - H ) / ( fHueRed - fHueOrange ) ) ) ), JKNDF);
   SMod += lerp(fColorSaturationModOrangeExt.x * ( 1.0 - min( 1.0, abs( ( fHueOrange - H ) / ( fHueOrange - fHueYellow ) ) ) ), fColorSaturationModOrangeExt.y * ( 1.0 - min( 1.0, abs( ( fHueOrange - H ) / ( fHueOrange - fHueYellow ) ) ) ), JKNDF);
   SMod += lerp(fColorSaturationModYellowExt.x * ( 1.0 - min( 1.0, abs( ( fHueYellow - H ) / ( fHueYellow - fHueGreen ) ) ) ), fColorSaturationModYellowExt.y * ( 1.0 - min( 1.0, abs( ( fHueYellow - H ) / ( fHueYellow - fHueGreen ) ) ) ), JKNDF);
   SMod += lerp(fColorSaturationModGreenExt.x * ( 1.0 - min( 1.0, abs( ( fHueGreen - H ) / ( fHueGreen - fHueYellow ) ) ) ), fColorSaturationModGreenExt.y * ( 1.0 - min( 1.0, abs( ( fHueGreen - H ) / ( fHueGreen - fHueYellow ) ) ) ), JKNDF);
   SMod += lerp(fColorSaturationModCyanExt.x * ( 1.0 - min( 1.0, abs( ( fHueCyan - H ) / ( fHueCyan - fHueGreen ) ) ) ), fColorSaturationModCyanExt.y * ( 1.0 - min( 1.0, abs( ( fHueCyan - H ) / ( fHueCyan - fHueGreen ) ) ) ), JKNDF);
   SMod += lerp(fColorSaturationModBlueExt.x * ( 1.0 - min( 1.0, abs( ( fHueBlue - H ) / ( fHueBlue - fHueCyan ) ) ) ), fColorSaturationModBlueExt.y * ( 1.0 - min( 1.0, abs( ( fHueBlue - H ) / ( fHueBlue - fHueCyan ) ) ) ), JKNDF);
   SMod += lerp(fColorSaturationModMagentaExt.x * ( 1.0 - min( 1.0, abs( ( fHueMagenta - H ) / ( fHueMagenta - fHueBlue ) ) ) ), fColorSaturationModMagentaExt.y * ( 1.0 - min( 1.0, abs( ( fHueMagenta - H ) / ( fHueMagenta - fHueBlue ) ) ) ), JKNDF);
   SMod += lerp(fColorSaturationModRedExt.x * ( 1.0 - min( 1.0, abs( ( fHueRed2 - H ) / ( fHueRed2 - fHueMagenta ) ) ) ), fColorSaturationModRedExt.y * ( 1.0 - min( 1.0, abs( ( fHueRed2 - H ) / ( fHueRed2 - fHueMagenta ) ) ) ), JKNDF);

   if ( JKIF > 0.5 ) {

   SMod += lerp(fColorSaturationModRedInt.x * ( 1.0 - min( 1.0, abs( ( fHueRed - H ) / ( fHueRed - fHueOrange ) ) ) ), fColorSaturationModRedInt.y * ( 1.0 - min( 1.0, abs( ( fHueRed - H ) / ( fHueRed - fHueOrange ) ) ) ), JKNDF);
   SMod += lerp(fColorSaturationModOrangeInt.x * ( 1.0 - min( 1.0, abs( ( fHueOrange - H ) / ( fHueOrange - fHueYellow ) ) ) ), fColorSaturationModOrangeInt.y * ( 1.0 - min( 1.0, abs( ( fHueOrange - H ) / ( fHueOrange - fHueYellow ) ) ) ), JKNDF);
   SMod += lerp(fColorSaturationModYellowInt.x * ( 1.0 - min( 1.0, abs( ( fHueYellow - H ) / ( fHueYellow - fHueGreen ) ) ) ), fColorSaturationModYellowInt.y * ( 1.0 - min( 1.0, abs( ( fHueYellow - H ) / ( fHueYellow - fHueGreen ) ) ) ), JKNDF);
   SMod += lerp(fColorSaturationModGreenInt.x * ( 1.0 - min( 1.0, abs( ( fHueGreen - H ) / ( fHueGreen - fHueYellow ) ) ) ), fColorSaturationModGreenInt.y * ( 1.0 - min( 1.0, abs( ( fHueGreen - H ) / ( fHueGreen - fHueYellow ) ) ) ), JKNDF);
   SMod += lerp(fColorSaturationModCyanInt.x * ( 1.0 - min( 1.0, abs( ( fHueCyan - H ) / ( fHueCyan - fHueGreen ) ) ) ), fColorSaturationModCyanInt.y * ( 1.0 - min( 1.0, abs( ( fHueCyan - H ) / ( fHueCyan - fHueGreen ) ) ) ), JKNDF);
   SMod += lerp(fColorSaturationModBlueInt.x * ( 1.0 - min( 1.0, abs( ( fHueBlue - H ) / ( fHueBlue - fHueCyan ) ) ) ), fColorSaturationModBlueInt.y * ( 1.0 - min( 1.0, abs( ( fHueBlue - H ) / ( fHueBlue - fHueCyan ) ) ) ), JKNDF);
   SMod += lerp(fColorSaturationModMagentaInt.x * ( 1.0 - min( 1.0, abs( ( fHueMagenta - H ) / ( fHueMagenta - fHueBlue ) ) ) ), fColorSaturationModMagentaInt.y * ( 1.0 - min( 1.0, abs( ( fHueMagenta - H ) / ( fHueMagenta - fHueBlue ) ) ) ), JKNDF);
   SMod += lerp(fColorSaturationModRedInt.x * ( 1.0 - min( 1.0, abs( ( fHueRed2 - H ) / ( fHueRed2 - fHueMagenta ) ) ) ), fColorSaturationModRedInt.y * ( 1.0 - min( 1.0, abs( ( fHueRed2 - H ) / ( fHueRed2 - fHueMagenta ) ) ) ), JKNDF);
   };
   return SMod;
}

--------------------------------------------------------------------------------------------------------------------
#if (HSV_EQUALIZER==1)
   hsvcolor.y = ColorEqualizerMod( hsvcolor.x, JKNightDayFactor, JKInteriorFactor ) + ( ColorEqualizerMult( hsvcolor.x, JKNightDayFactor, JKInteriorFactor ) * hsvcolor.y );
#endif



The other HSV code seemed to be right as there the only thing is to add the seperation code without needing to change any other code.


Top
 Profile  
 
PostPosted: 24 Jul 2013, 22:12 
Offline

Joined: 22 Jan 2013, 01:10
Posts: 40
Thanks, JawZ. I took a look at your mixed enbeffect code and figured out what was wrong with mine. I would never have thought about that though, so hats off to you. I'm going to take a look at your linked file from above. Thanks again.


Top
 Profile  
 
PostPosted: 25 Jul 2013, 20:24 
Offline

Joined: 22 Jan 2013, 01:10
Posts: 40
Hey JawZ - why in your most recent version of the mixed enbeffect did you disable all post-processing methods except #1? I tried adding them back, but none work. Do you have any idea why?

EDIT:

Nevermind. I figured it out. Was a hard to find typo. All good now. Thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group