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

All times are UTC





Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: 01 Dec 2013, 23:59 
Offline

Joined: 01 Dec 2013, 12:49
Posts: 2
I'm playing Oblivion and have found an enbpalette.bmp with a strong color shift that looks really cool at night. Problem is, in the daytime it stomps over the bright blue skies and green fields that give the Oblivion world much of its character.

Is there a way to make the enbpalette only get applied at night?


Top
 Profile  
 
Tomoko
PostPosted: 02 Dec 2013, 00:14 
Offline
*blah-blah-blah maniac*
User avatar

Joined: 27 Dec 2011, 08:53
Posts: 14816
Location: Russia
Open enbeffect.fx file in any text editor, find line:
Code:
color.rgb=saturate(color.rgb);
float3   brightness=Adaptation.xyz;//tex2D(_s4, 0.5);//adaptation luminance

and insert between them the following:
Code:
float3 nopalcolor=color;

then find this line below:
Code:
color.rgb=palette.rgb;

and replace it by this one:
Code:
color.rgb=lerp(palette, nopalcolor, ENightDayFactor);


Entire palette code will look like this after such changes:
Code:
#ifdef E_CC_PALETTE
   color.rgb=saturate(color.rgb);
float3 nopalcolor=color;
   float3   brightness=Adaptation.xyz;//tex2D(_s4, 0.5);//adaptation luminance
//   brightness=saturate(brightness);//old version from ldr games
   brightness=(brightness/(brightness+1.0));//new version
   brightness=max(brightness.x, max(brightness.y, brightness.z));//new version
   float3   palette;
   float4   uvsrc=0.0;
   uvsrc.y=brightness.r;
   uvsrc.x=color.r;
   palette.r=tex2Dlod(_s7, uvsrc).r;
   uvsrc.x=color.g;
   uvsrc.y=brightness.g;
   palette.g=tex2Dlod(_s7, uvsrc).g;
   uvsrc.x=color.b;
   uvsrc.y=brightness.b;
   palette.b=tex2Dlod(_s7, uvsrc).b;
   //color.rgb=palette.rgb;
color.rgb=lerp(palette, nopalcolor, ENightDayFactor);
#endif //E_CC_PALETTE

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


Top
 Profile  
 
PostPosted: 02 Dec 2013, 09:04 
Offline

Joined: 01 Dec 2013, 12:49
Posts: 2
That worked, thanks!


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