Jump to content

A better enbpalette.fx shader for MGE XE


Daemonjax

Recommended Posts

Building on what phal created, I added some options and tweaks.

 

Screenshot comparison:

 

 

ENBPalette off:

 

palette%20off.png

 

 

ENBPalette (weighted color lum: off, curve: off -- phal's stock shader):

 

palette%20color%20blind.png

 

 

ENBPalette (weighted color lum: ON, curve: ON -- using a curve that's pretty close to being linear): 0.8x^{1.2} + 0.2sqrt{x}

 

palette%20weighted%20lum%20with%20scurve

 

 

ENBPalette (weighted color lum: ON, curve: ON -- using a more pronounced curve): 0.8x^{2} + 0.2sqrt{x}

 

palette%20weighted%20lum%20with%20scurve

 

 

ENBPalette (weighted color lum: ON, curve: ON -- using a slightly different curve): 0.6x^{2} + 0.4sqrt{x}

 

palette%20weighted%20lum%20with%20scurve

 

 

 

 

 

 

The curve is configurable, and the shader has the following defined values:

//#define USE_ENB_PALELETTE_STRENGTH 0.75  // (optional) [0, 1.0] ; decreases strength of the palette shift.  1.0 would be full strength, while 0 would effectively disable this shader.
#define ENB_PALETTE_MINIMUM_CONTRAST  0.10 		//[.05, .15] This intentionally has very little effect when USE_CURVE is enabled
#define RED_WEIGHT					  0.2126	// 1.0/3.0 or 0.299 or 0.2126 are sane values (as long as the sum of the three channels equal 1.0)
#define GREEN_WEIGHT				  0.7152	// 1.0/3.0 or 0.587 or 0.7152 are sane values (as long as the sum of the three channels equal 1.0)
#define BLUE_WEIGHT					  0.0722	// 1.0/3.0 or 0.114 or 0.0722 are sane values (as long as the sum of the three channels equal 1.0)

#define USE_CURVE   							                // default is enabled
	#define	CURVE_DARK_CONTRAST	  	  0.20		// higher values darken the image and reduce contrast
	#define CURVE_LIGHT_POWER		          2	                // [1.2, 5] -- higher values increase the contrast of mid and bright tones (you may need to reduce the strength of your bloom shader)

It may be hard to see in these screenshots, but even using a weak curve gives more contrast to the scene, which was my intended goal. You can make it lighter or darker while still increasing or at least maintaining contrast (especially in dark areas).

 

Download link: https://dl.dropboxusercontent.com/u/32777109/Mods/Morrowind/shaders/enbpalette.zip

 

Note: I've included my enbpalette.tga in the zip. It's a modified version of the one I found included with the original shader code, but it had some noise in it which wasn't good. I really liked it, otherwise.

 

I recommend...

 

for interiors:

#define CURVE_DARK_CONTRAST 0.20
#define CURVE_LIGHT_POWER 2

for exteriors:

#define CURVE_DARK_CONTRAST 0.10
#define CURVE_LIGHT_POWER 1.2

 

... But this all depends on your particular palette. Technically, all of this can be done by altering your palette file -- but that's not really practical. You'll still probably need to lower the strength of your bloom shader (if using one).

 

I also recommend https://www.desmos.com/calculator if you want to see what the curves look like (you're only interested in the 0 to 1 range of x).

 

EDIT: Looks like I forgot to actually unclude the palette,tga file in the above zip. Fixed.

 

EDIT2: I should probably add an option to exclude or reduce the strength of the effect on your hands in 1st person. Thoughts?

 

EDIT3: So, I see all my dropbox links are broken. Here's a share link to my morrowind stuff: https://www.dropbox.com/sh/n5e9lobjgj0n8so/AADdZO-DSUc-LHbYxd_8UNSxa?dl=0

Edited by Daemonjax
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...