Changed my tuning palette shader code to also support 4D LUTs based on the scene brightness value. Seems to work as expected.
The performance is not dependent on how many 3D LUTs you want to run in parallel.

The current version is available on github if anyone want to try it out already.

Can you please release reshade 1 framework compatible version of this shader?

Also, can you do please a simple white and black point autobalance shader that changes white and black point smoothly like exampe you posted?

Point is - it should work like GIMP auto white balance but just every frame with smooth interpolation with previous frame to avoid sudden changes o color balance?

FOr example there is a FFX for PC - gameplay sequences has almost perfect color balance, but FMVs are all in Rec 709 color space and white is grey and black is grey and in most of cutscenes black point should be 37 of 255 for RGB and white 235 of 255 (so the 37 is actual 0 and 235 is actual 255 and color range should be smoothly expanded), but in some sceens like 1st atack of Sin when Tidus with Yuna just started adventure on ship. color range is very different and not correct even at 37-235. but auto balance in gimp finnds values perfectly and in tis case happens to be 30-198 R, 40-202 G, 50-218 G , this wat color looks almost exactly like in gameplay, but yet again it changes from frame to frame, so its good idea to keep make some shader that will sample frame for lowes and highest of R G B values and consider them as 0 and 255 and scale each channel (better to upscale colors to higer range to do thigs smoothly and avoid banding) arrordingly.
For sake of optimisatio something like frame skip optionn could be added, so we can control if we want to autotune each frame with FrameSkip=0 ot for example every 2nd frame with Frameskip=1 or even sample and colors just on once per second with Frameskip=30 or FrameSkip=60. this depends on framerate o game, also if Reshade has some FPS dynamic value we can use it like %CurrrentFPS% or %CurrrentFPS%/2 for adaptive frameskip since FPS could be different in gameplay and cutscenes. FMVs usually contstand 30 fps, this is btw can be used as triggerer to active color balance just in cutscenes with constant 30 fps adn deactivate if FPS is higher or lower to avoide touching gameplay colors.

Can you do such shader as quickly as possible? I guess you need to modify existing one to make it quicker.

To illustrate you issue ive seenin many games just look at this video:

Upper left is how it should look with full color range, and upper right is how it looks in 709 color space. Seems like lazy PORTING of games that was calibrated for HDTVS and was not recalibrated for PC full range when was ported.

A lot of games suffering from 709 color space plus internal coloris's error which screws colors. for example Witcher 3 and GTAV have all colors messed up. While i made static lut in GIMP that corrects colors, due of differrent settings in gameplay, cutscenes, and different areas one static lut is not perfect for every case, so dynamic solution is prefered.