[Fallout4] Histogram based Adaptation

share shaders here
  • Author
  • Message
Offline
*blah-blah-blah maniac*
Posts: 565
Joined: 05 Apr 2014, 10:29
Location: Taiwan

[Fallout4] Histogram based Adaptation

Code: Select all

//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
// ENBSeries Fallout 4 adaptation file, hlsl DX11                   //
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
//  Histogram based adaptation by kingeric1992                      //
//      based on the description here:                              //
//  https://docs.unrealengine.com/latest/INT/Engine/Rendering/PostProcessEffects/AutomaticExposure/
//                                                                  //
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
Image


Adapted to brighter scene:
Image

and to a darker scene:
Image
enbadaptation.fx
Nov.23.2016
(7.35 KiB) Downloaded 831 times
=================================

And a tiny tool to visualize the adaptation level: (shown in bottom right corner above)

Code: Select all

//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
// ENBSeries Fallout 4 adaptation file, hlsl DX11                   //
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
//  Adaptation Level Visualizer by kingeric1992                     //
//                                                                  //
//  Usage: Include this file in enbeffect.fx, then add              //
//                                                                  //
//          pass ADAPT_TOOL_PASS                                    //
//                                                                  //
//  after other passes in a technique.                              //
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++//
like this:

Code: Select all

#include "enbeffect_AdaptTool.fxh"

technique11 ORIGINALPOSTPROCESS <string UIName="Vanilla";> 
{
	pass p0
	{
		SetVertexShader(CompileShader(vs_5_0, VS_Quad()));
		SetPixelShader(CompileShader(ps_5_0, PS_DrawOriginal()));
	}
    
	pass ADAPT_TOOL_PASS
}
enbeffect_AdaptTool.fxh.txt
Nov.29.2016

the .txt extension is to bypass file restriction in the forum.
(2.51 KiB) Downloaded 584 times
Last edited by kingeric1992 on 28 Nov 2016, 17:47, edited 1 time in total.
_________________
Intel Xeon L5639 6C12T @3.96GHz | Gigabyte ga-x58a-ud3r | MSI GTX680 4G | 48G RAM | Intel 760p Nvme w clover bootloader
Flickr
YouTube

Offline
User avatar
*blah-blah-blah maniac*
Posts: 1498
Joined: 31 Mar 2012, 15:06
Location: France

Re: [Fallout4] Histogram based Adaptation

Nice one. Waiting to download and try it.
Thanx.
_________________
Lian Li PC011 Dynamic, Corsair AX 1500i PSU, i9 10850K @5.0 Ghz, Aorus Z490 Ultra, RTX3090 MSI Gaming X Trio, 32GB Corsair Vengeance Pro RGB RAM@3600, Corsair MP600 1TB NVME System Drive, 10 TB Storage, W10 Pro 64, Custom Hard Tubing Watercooling Loop

Offline
User avatar
*blah-blah-blah maniac*
Posts: 849
Joined: 28 Dec 2011, 00:50

Re: [Fallout4] Histogram based Adaptation

Wowza! Eric, your generosity knows no bounds :)
_________________
Fallout 4 ENB Video Series | Skyrim ENB Video Series | My YouTube Channel
Intel i7-4700HQ @ 2.4GHz | NVidia GTX780M 4GB | 24GB RAM

Offline
*blah-blah-blah maniac*
Posts: 565
Joined: 05 Apr 2014, 10:29
Location: Taiwan

Re: [Fallout4] Histogram based Adaptation

Some notes here,

The luminance detection range is hard coded to -9 (2^-9) to 3 (2^3), which is the range of most of the scene in FO4 I think, judged by histogram bin reassignment. Can't say for sure if it is the same for Skyrim SE. (in Skyrim, it is about 2^-5 to 2^2)

Secondly, I've compared the result of using 16x16 texture input and 683x384, they're roughly the same in most of the times, with maximum deviation of 1/64 stops in certain cases.

Thirdly, for eye adaptation, the adaptation time should be longer to have a nice and subtle transition between scenes,
for auto exposure, the adaptation time should be instantaneous.
_________________
Intel Xeon L5639 6C12T @3.96GHz | Gigabyte ga-x58a-ud3r | MSI GTX680 4G | 48G RAM | Intel 760p Nvme w clover bootloader
Flickr
YouTube

Offline
User avatar
*blah-blah-blah maniac*
Posts: 1498
Joined: 31 Mar 2012, 15:06
Location: France

Re: [Fallout4] Histogram based Adaptation

Copy that.
_________________
Lian Li PC011 Dynamic, Corsair AX 1500i PSU, i9 10850K @5.0 Ghz, Aorus Z490 Ultra, RTX3090 MSI Gaming X Trio, 32GB Corsair Vengeance Pro RGB RAM@3600, Corsair MP600 1TB NVME System Drive, 10 TB Storage, W10 Pro 64, Custom Hard Tubing Watercooling Loop

Offline
User avatar
*blah-blah-blah maniac*
Posts: 506
Joined: 02 Aug 2013, 23:06
Location: New Hampshire, US

Re: [Fallout4] Histogram based Adaptation

Thank you for sharing this. I still play a ton of FO4 and haven't used any of the adaption ENB for it yet. Downloaded and going to see if I can figure it out well enough to add to my presets. Always appreciative of all the work you do!
_________________
Intel Core i9-9900K CPU @ 3.6 GHz // GeForce RTX 2080 Ti VRAM 11GB // Win10 64 and 64GB Ram // Monitor 2560x1440@144

Offline
User avatar
*master*
Posts: 136
Joined: 08 Nov 2012, 15:24

Re: [Fallout4] Histogram based Adaptation

Oh, this looks fantastic! Thank you very much!

Offline
User avatar
*blah-blah-blah maniac*
Posts: 983
Joined: 09 Dec 2012, 00:29

Re: [Fallout4] Histogram based Adaptation

Very useful. Works great in Skyrim SE. Thank you kindly, as always :D
_________________
Rudy ENB for Skyrim, Skyrim SE, for Fallout New Vegas, for Dragon's Dogma

English is not my native language.

AMD Ryzen 9 5900X, Gigabyte B550 AORUS PRO AC, Arctic Liquid Freezer II 280, Nvidia Geforce RTX 2070 Super, 64GB ram

Offline
Posts: 5
Joined: 11 Mar 2017, 10:24

Re: [Fallout4] Histogram based Adaptation

hopefully this can fix The Institute and start of the game for me

Offline
Posts: 5
Joined: 11 Mar 2017, 10:24

Re: [Fallout4] Histogram based Adaptation

hi i am trying to get this to work only effecting the start of the game and the institute but i cant find any values that will leave the rest of the game alone and and effect these to place enough anyone know how to help
Post Reply