Dwm_lut - Apply 3D LUTs to the Windows desktop for system-wide color correction/calibration

Overview

About

This tool applies 3D LUTs to the Windows desktop by hooking into DWM. It works in both SDR and HDR modes, and uses tetrahedral interpolation on the LUT data. In SDR, ordered dithering is applied to the output to reduce banding.

Right now it should work on any 20H2 or 21H1 build of Windows 10, and also the current build of Windows 11, and I'll try to update it whenever a new version breaks it.

Usage

Use DisplayCAL or similar to generate .cube LUT files of any size, run DwmLutGUI.exe, assign them to monitors and then click Apply. Note that LUTs cannot be applied to monitors that are in "Duplicate" mode.

For ColourSpace users with HT license level, 65^3 eeColor LUT .txt files are also supported.

HDR LUTs must use BT.2020 + SMPTE ST 2084 values as input and output.

Minimizing the GUI will make it disappear from the taskbar, and you can use the context menu of the tray icon to quickly apply or disable all LUTs. For automation, you can start the exe with any (sensible) combination of -apply, -disable, -minimize and -exit as arguments.

Note: DirectFlip and MPO get force disabled on monitors with an active LUT. These features are designed to improve performance for some windowed applications by allowing them to bypass DWM (and therefore also the LUT). This ensures that LUTs get applied properly to all applications (except exclusive fullscreen ones).

Compiling

Using MSYS2's mingw64 environment: Install mingw-w64-x86_64-MinHook and run

gcc dwm_lut.c -O3 -shared -static -s -lMinHook -ld3dcompiler -luuid -Wl,--exclude-all-symbols -o dwm_lut.dll

to generate the DLL.

As for the GUI, just open the project in Visual Studio and compile a x64 Release build.

Issues
  • Stopped working on latest Windows 11 22H1 22000.706 update

    Stopped working on latest Windows 11 22H1 22000.706 update

    It appears dwm_lut is no longer working on Windows 11 22H1 build 22000.706. I'm wondering if Microsoft rolled some of the changes that break 22H2 back into 22H1 22000.706.

    opened by aaronmmarks 6
  • Adaptive Sync Not Working

    Adaptive Sync Not Working

    Hi,

    Thanks for making this program! When I apply a 3dlut, Adaptive Sync is disabled. I do not game, but the windows Movies & TV UWP video player uses Adaptive Sync to match the display + video framerates to eliminate judder. Is this something that can be fixed?

    opened by perrinpagess 6
  • Add ability to specify LUT file paths via command argument

    Add ability to specify LUT file paths via command argument

    DwmLut has some useful command arguments right now. However, if user wants to switch between different lut files via command, he has to edit config.xml then run with -apply.

    This is attempt to fill the void by supporting two extra arguments "-sdr" and "-hdr". Example:

    DwmLutGUI.exe -sdr "1:C:\luts\1\sdr.lut;2:C:\luts\2\sdr.lut" -hdr "1:C:\luts\1\hdr.lut;2:C:\luts\2\hdr.lut" -apply -exit
    

    This example sets monitor 1's SDR lut to "C:\luts\1\sdr.lut", and monitor 2's SDR lut to "C:\luts\2\sdr.lut". Similar to HDR luts.

    Also, paths set via this way does not permanently change the content of config.xml. This suits the "temporary" nature of this argument.

    What do you think?

    opened by CrendKing 5
  • Incompatible with HDCP Protected Content (Netflix)

    Incompatible with HDCP Protected Content (Netflix)

    When playing DRM protected content, HDCP activates and causes one or two black flashes of the screen. The LUT is unloaded. The application status becomes "Inactive". And the video begins playing.

    As a reminder, High-bandwidth Digital Content Protection (HDCP) is used for DRM on video streaming services.

    Instructions:

    1. Launch dwm_lut and press Apply
    2. Log into a video streaming platform, like Netflix, Amazon Prime, BBC iPlayer, etc.
    3. Play a video (I recommend testing on Firefox. It shows a HDCP icon in the address bar whenever it kicks in.)

    I don't know what you could do about this. Maybe reactivate once HDCP is no longer active?

    opened by Terrobility 5
  • Not working with Intel HD3000

    Not working with Intel HD3000

    On Windows 11. Says active but no change in color output is seen. Oddly with a generic Microsoft driver active did work as expected. According to GPU-Z the generic driver supports OpenGL 2.1, the Intel driver supports OpenGL 3.1 with many report on the web talking about wonky OpenGL support.

    Any testing I can do? Let me know.

    opened by markanini 4
  • Using LUT with Netflix app causes screen to pixelate

    Using LUT with Netflix app causes screen to pixelate

    Applying the LUT while the Netflix app is running causes the screen to become pixelated and unusable. Disabling the LUT immediately resolves the issue. I also tried with the native Hulu and Amazon Prime Video apps and it did not reproduce. Not a big deal to turn it off, though.

    Example of the issue https://photos.app.goo.gl/r4ta6sHf8H8NBUUZ8

    opened by adbowers 2
  • Inacuracy in the shadows

    Inacuracy in the shadows

    I found it looks different when I apply my calibration LUT to LUT stress test image in Resolve, compared to loading it into DwmLut. I can't show it, because (luckily) screenshots aren't affected by the LUT, but it makes shadows desaturated, compared to applying the LUT in Resolve. Also it looks like there is some downsizing of the cube size of the LUT before applying the LUT. Probably this is the reason for the artifact I got?

    opened by antonmeleshkevich 1
  • Unexpected behaviour with chat windows, open folders and on startup

    Unexpected behaviour with chat windows, open folders and on startup

    1. When a skype chat window is active and you apply a 3dlut, the upper part of the screen doesn't have the 3dlut applied;
    2. When minimizing a folder that is open for 5+ minutes, the last frame of the fade animation stays on-screen, you have to refresh in-order for it to disappear.
    3. On startup sometimes the 3dlut is not applied, you have to disable and enable it again to work properly.

    OS: Win10 x64 21h2

    opened by pqsmmobile 0
  • Extended Display and 2 GPU's

    Extended Display and 2 GPU's

    @ledoge First of all I want to thank you for your work and for this product. It is trully a great tool and it saved me the trouble and money because I was set on buying a new monitor before finding this tool!

    Now, the problem I encountered. My laptop has 2 GPU's. An integrated one and a dedicated one. My laptop is always in hybrid mode because I usually use my laptop on different places and I need the battery life when I'm on the go. If the laptop is in hybrid mode, when I use both monitors at the same time (in extended mode), both monitors are assigned the same number (1) in DWM_LUT. This causes the program to assign the lut but a few seconds later the screen goes black and then the program goes to the state of "inactive". If I disable hybrid mode (dedicated gpu only), the program assigns different numbers to the displays, Laptop display number one and external display number 2, and the luts are applied.

    Maybe a simple fix would be to not allow the program to assign the same number to different monitors. If a number is already assigned, then the program assigns a different number.

    iGPU + dGPU (same number applied to both monitors) iGPU + dGPU

    dGPU only (different number applied to the monitors) dGPU

    opened by dimipisi 3
  • how to create cube file from icm profile ?

    how to create cube file from icm profile ?

    hey im using an icm profile in novideo_srgb just fine. scrolling through the hue in photoshop color picker results in no obvious banding. using the same profile converted to a cube file used in dwm_lut gives heavy banding instead . i guess its not the fault of the program but rather a conversion issue.

    I used DisplayCAL-3DLUT-maker.exe to convert back but maybe you know a better way , would be nice if we could just load the icm like novideo_srgb does

    opened by Ulf3000 1
  • Installer and Automatic Start/Restart

    Installer and Automatic Start/Restart

    @ledoge Have you considered creating an installer/uninstaller with an option in dwm_lut to automatically start with Windows and then also automatically restart it when the power state has changed?

    I've accomplished the automatic start and restart on power state change here with a scheduled task: https://hub.displaycal.net/forums/topic/i-made-a-tool-for-applying-3d-luts-to-the-windows-desktop/page/10/#post-34665

    I think this would make the tool even more accessible in a professional environment.

    opened by aaronmmarks 2
  • "Failed to load or initialize DLL...." on Windows 11 22H2

    Im getting "Failed to load or initialize DLL. This probably means that a LUT file is malformed or that DWM got updated." on Windows 11 Version 22H2 (OS Build 22581.100)

    opened by Fardin48 9
Releases(v3.8)
AviSynthPlus color correction filter.

Description A color constancy filter that applies color correction based on the grayworld assumption. For more info. This is a port of the FFmpeg filt

null 6 Jun 11, 2022
This plugin allows Flutter desktop apps to defines system/inapp wide hotkey (i.e. shortcut).

hotkey_manager This plugin allows Flutter desktop apps to defines system/inapp wide hotkey (i.e. shortcut). hotkey_manager Platform Support Quick Star

LeanFlutter 61 Jun 16, 2022
Invoke.hpp - std::invoke/std::apply analogs for C++11/14

invoke.hpp std::invoke/std::apply analogs for C++11/14 Requirements gcc >= 4.9 clang >= 3.8 msvc >= 2015 Installation invoke.hpp is a header-only libr

Matvey Cherevko 32 Apr 27, 2022
Playbit System interface defines an OS-like computing platform which can be implemented on a wide range of hosts

PlaySys The Playbit System interface PlaySys defines an OS-like computing platform which can be implemented on a wide range of hosts like Linux, BSD,

Playbit 227 Jun 22, 2022
A simple fisheye distortion correction program

Correct Fisheye Distortion of the first Chinese Mars Image 热烈祝贺中国首次火星探测天问一号任务探测器发回火星照片 Requirements A C++ compiler OpenCV How to compile cmake . make

Shiqi Yu 30 Jun 14, 2022
Lidar-with-velocity - Lidar with Velocity: Motion Distortion Correction of Point Clouds from Oscillating Scanning Lidars

Lidar with Velocity A robust camera and Lidar fusion based velocity estimator to undistort the pointcloud. This repository is a barebones implementati

ISEE Research Group 128 Jun 20, 2022
"Zero setup" cross-compilation for a wide variety of architectures.

"Zero setup" cross-compilation for a wide variety of architectures. xcross includes compact docker images and a build utility for minimal setup C/C++ cross-compiling, inspired by rust-embedded/cross

Alexander Huszagh 24 May 20, 2022
An open collection of tools and experiments for rendering wide-gamut scene-linear data into an image for an SDR or HDR display device.

Open Display Transform An open collection of tools and experiments for rendering wide-gamut scene-linear data into an image for an SDR or HDR display

Jed Smith 111 Jun 27, 2022
This repository is used for automatic calibration between high resolution LiDAR and camera in targetless scenes.

livox_camera_calib livox_camera_calib is a robust, high accuracy extrinsic calibration tool between high resolution LiDAR (e.g. Livox) and camera in t

HKU-Mars-Lab 365 Jun 20, 2022
Fast and Accurate Extrinsic Calibration for Multiple LiDARs and Cameras

Fast and Accurate Extrinsic Calibration for Multiple LiDARs and Cameras The pre-print version of our paper is available here. The pre-release code has

HKU-Mars-Lab 186 Jun 24, 2022
This package estimates the calibration parameters that transforms the camera frame (parent) into the lidar frame (child)

Camera-LiDAR Calibration This package estimates the calibration parameters that transforms the camera frame (parent) into the lidar frame (child). We

Australian Centre for Field Robotics 138 Jun 27, 2022
A generic and robust calibration toolbox for multi-camera systems

MC-Calib Toolbox described in the paper "MultiCamCalib: A Generic Calibration Toolbox for Multi-Camera Systems". Installation Requirements: Ceres, Boo

null 141 Jun 27, 2022
This repo contains source code of our paper presented in IROS2021 "Single-Shot is Enough: Panoramic Infrastructure Based Calibration of Multiple Cameras and 3D LiDARs"

Single-Shot is Enough: Panoramic Infrastructure Based Calibration of Multiple Cameras and 3D LiDARs Updates [2021/09/01] first commit, source code of

Alibaba 57 Jun 21, 2022
the implementations of 'A Flexible New Technique for Camera Calibration' and Bouguet's method

StereoCameraCalibration MonocularCameraCalibration/StereoCameraCalibration/StereoCameraRectification 1、Class "MonocularCameraCalibration" provides the

gtc1072 6 Apr 14, 2022
Project to create a teensy based gamecube controller with hall effect sensors, snapback filtering, and notch calibration

PhobGCC Gamecube controller motherboard using a teensy as the microcontroller. Aim is to make an accessible and consistent controller. Has the option

null 75 Jun 26, 2022
A beginner friendly desktop UI for Tasmota flashed devices for Windows, macOS and Linux.

TasmoManager A beginner friendly desktop UI for Tasmota flashed devices for Windows, macOS and Linux. Features Native Tasmota device discovery (via ta

Tom Butcher 43 Jun 16, 2022
Add virtual monitors to your windows 10 device! Works with Oculus software, obs, and any desktop sharing software

License MIT and CC0 or Public Domain, whichever is least restrictive -- Use it AS IS - NO IMPLICIT OR EXPLICIT warranty This may break your computer,

Rashi Abramson 162 Jun 21, 2022
Windscribe 2.0 desktop client for Windows, Mac and Linux

Windscribe 2.0 Desktop Application This repo contains the complete source code for the Windscribe 2.0 app. This includes installer, service/helper, ba

Windscribe 284 Jun 20, 2022
A npm package that lets you automate your windows desktop.

js-macro A npm package that lets you automate your windows desktop. npm i js-macro Examples Simple cursor usage const { cursor } = require("js-macro"

4 Jan 28, 2022