Please use english language
It is currently 26 Feb 2020, 10:33

All times are UTC





Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: HLSL ENBEffect Question
PostPosted: 06 Dec 2015, 01:28 
Offline

Joined: 22 Jan 2013, 01:10
Posts: 40
What's wrong with this file:

Code:
#if ( POSTPROCESS == 2 )
      float NewAdaptationMaxV2 = lerp(AdaptationMaxV2Ext.x, AdaptationMaxV2Ext.y, ENightDayFactor);
      float NewAdaptationMinV2 = lerp(AdaptationMinV2Ext.x, AdaptationMinV2Ext.y, ENightDayFactor);
      float NewBrightnessV2 = lerp(BrightnessV2Ext.x, BrightnessV2Ext.y, ENightDayFactor);
      float NewBlacknessV2 = lerp(BlacknessV2Ext.x, BlacknessV2Ext.y, ENightDayFactor);
      float NewIntensityContrastV2 = lerp(IntensityContrastV2Ext.x, IntensityContrastV2Ext.y, ENightDayFactor);
      float NewColorSaturationV2 = lerp(ColorSaturationV2Ext.x, ColorSaturationV2Ext.y, ENightDayFactor);
      float NewToneMappingOversaturationV2 = lerp(ToneMappingOversaturationV2Ext.x, ToneMappingOversaturationV2Ext.y, ENightDayFactor);
      float NewToneMappingCurveV2 = lerp(ToneMappingCurveV2Ext.x, ToneMappingCurveV2Ext.y, ENightDayFactor);
      if ( EInteriorFactor ) {
         NewAdaptationMaxV2 = lerp(AdaptationMaxV2Int.x, AdaptationMaxV2Int.y, ENightDayFactor);
         NewAdaptationMinV2 = lerp(AdaptationMinV2Int.x, AdaptationMinV2Int.y, ENightDayFactor);
         NewBrightnessV2 = lerp(BrightnessV2Int.x, BrightnessV2Int.y, ENightDayFactor);
         NewBlacknessV2 = lerp(BlacknessV2Int.x, BlacknessV2Int.y, ENightDayFactor);
         NewIntensityContrastV2 = lerp(IntensityContrastV2Int.x, IntensityContrastV2Int.y, ENightDayFactor);
         NewColorSaturationV2 = lerp(ColorSaturationV2Int.x, ColorSaturationV2Int.y, ENightDayFactor);
         NewToneMappingOversaturationV2 = lerp(ToneMappingOversaturationV2Int.x, ToneMappingOversaturationV2Int.y, ENightDayFactor);
         NewToneMappingCurveV2 = lerp(ToneMappingCurveV2Int.x, ToneMappingCurveV2Int.y, ENightDayFactor);
      };
      grayadaptation = max(grayadaptation, 0.0);
      grayadaptation = min(grayadaptation, 50.0);
      color.xyz = color.xyz / (grayadaptation * NewAdaptationMaxV2 + NewAdaptationMinV2);
      color.xyz *= NewBrightnessV2;
      color.xyz += NewBlacknessV2;
      float3 xncol = normalize(color.xyz);
      float3 scl = color.xyz/xncol.xyz;
      scl = pow(scl, NewIntensityContrastV2);
      xncol.xyz = pow(xncol.xyz, NewColorSaturationV2);
      color.xyz = scl * xncol.xyz;
      float lumamax = NewToneMappingOversaturationV2;
      color.xyz = (color.xyz * (1.0 + color.xyz / lumamax)) / (color.xyz + NewToneMappingCurveV2);
   #endif


That's just an excerpt of the full file. But I'm having trouble. As it shows there, it does not distinguish between interior and exteriors. With the above code, the only settings that effect the scene are the interior setings. If I set

Code:
if (EInteriorFactor == 0 )


then the only settings that effect the scene are the exterior settings. Why? Is the "EInteriorFactor" setting not working properly? By the way, this is an ENB for OBLIVION. Oblivion. Any ideas what's wrong and how I can make it work properly. My onl;y guess is that EInteriorFactor is bugged. Help is greatly appreciated.


Top
 Profile  
 
Tomoko
PostPosted: 06 Dec 2015, 01:42 
Offline
*blah-blah-blah maniac*
User avatar

Joined: 27 Dec 2011, 08:53
Posts: 14816
Location: Russia
First, try to visualize EInteriorFactor by placing it at the end of shader. If you see it works properly, then try "if (EInteriorFactor>0.00001)". If it fails, probably compiler bug, try then to compute variables outside of "if" and then mix them by lerp and factor of EInteriorFactor.

_________________
i5-4690k, 16Gb RAM, GTX 1060 6Gb, X-Fi Titanium, Win7 x128
I am INFP, not the brutal, godamnit.


Top
 Profile  
 
PostPosted: 06 Dec 2015, 02:02 
Offline

Joined: 22 Jan 2013, 01:10
Posts: 40
Okay. I tested with EInteriorFactor at the end of the shader, and it is showing exteriors as interiors. Even though I am in an exterior, it returns that I am in an interior. Odd. Bug in the ENBSeries 0.81 for Oblivion???? I guess. I don't know. You're the guy to answer that one.


Top
 Profile  
 
PostPosted: 06 Dec 2015, 02:23 
Offline

Joined: 22 Jan 2013, 01:10
Posts: 40
Okay. I tested with the lerp option, and it still shows exteriors as being interiors. So, I'm thinking "EInteriorFactor" is bugged. I don't suppose you could be a super cool, nice guy and fix the bug?? Hey, I have to ask.


Top
 Profile  
 
PostPosted: 06 Dec 2015, 09:10 
Offline
*blah-blah-blah maniac*
User avatar

Joined: 27 Dec 2011, 08:53
Posts: 14816
Location: Russia
It works fine, search for incompatible mods installed. Tested with following code in enbeffect.fx
Code:
color.x=EInteriorFactor;
   _oC0.w=1.0;
   _oC0.xyz=color.xyz;
   return _oC0;

_________________
i5-4690k, 16Gb RAM, GTX 1060 6Gb, X-Fi Titanium, Win7 x128
I am INFP, not the brutal, godamnit.


Top
 Profile  
 
PostPosted: 06 Dec 2015, 14:17 
Offline

Joined: 22 Jan 2013, 01:10
Posts: 40
Ooooooh! You know, I didn't think about mods. That's the problem. I'm running All Natural, which makes interiors act like exteriors for lighting purposes. That's the problem! Well, I can't live without All Natural, so I'll just have to rewrite the shader with the I/E code disabled. Thank you, ENBSeries! That puts a lot of the frustration at ease.


Top
 Profile  
 
PostPosted: 10 Dec 2015, 15:30 
Offline

Joined: 22 Jan 2013, 01:10
Posts: 40
I don't understand. I've removed All Natural, but the interior settings of the ENB shader and INI is still altering the exterior spaces. I've looked at my load order and can't find the culprit. Do you know of any mods that would make the ENB detect exteriors as interiors? Interiors are correctly detected as interiors, but the exteriors are registering as interiors too. ENBSeries, what is your code that distinguishes exteriors from interiors?


Top
 Profile  
 
PostPosted: 10 Dec 2015, 16:31 
Offline

Joined: 22 Jan 2013, 01:10
Posts: 40
I finally found the mod that is "confusing" ENB. It's Shademe. I have no idea why, nor have I found a setting to correct this behavior, but Shademe tricks ENB into thinking an exterior is an interior.


Top
 Profile  
 
PostPosted: 10 Dec 2015, 17:39 
Offline

Joined: 22 Jan 2013, 01:10
Posts: 40
It's Shadme's ForceSM3RenderPath setting. It "confuses" ENB's. Disable it for ENB's to work as intended.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 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