-
-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
3DLUT shader as an temporary solution for Color Management for hyprland #38
Comments
I believe Hyprland is supposed to support per-output shaders (see hyprwm/Hyprland#2485), but I couldn't get it to work, maybe it's a bug. |
So to clarify, what is a 3DLUT shader? Does this blog post describe what you're looking to implement? What is the appeal of this over, say, writing shaders by hand? Is this a feature that makes "color management shaders" (for lack of a better term) easier? |
Yes, that blog post sums PNG 3DLUTs up. It allows using a standard format for color/gamma correction (or color modification if you'd like), things like Reshade, LibRetro, Blender and apparently Gimp can use PNGs, Gimp can also use ICCs, Displaycal/Argyllcms can make PNG and other 3DLUT formats such as PNGs are typically used, but these other formats could be used if they're easier, though maybe harder to modify. Writing a shader by hand for the purpose of accurate color/gamma correction for your display would be tricky without data that a colorimeter/spectrometer provides, espically when displays can be like this https://www.youtube.com/watch?v=QGIsvXa4zGg&t=11m12s And if you do have one it'd be much easier to make a 3DLUT than to manually make a shader with that data, especially if you making one with a HDR gamma curve. |
Just a novice user here with a shitty laptop screen. I have an icc calibration file for my laptop but i am no expert in creating a shader. I tried to implement a basic fragment shader with the help of chatgpt, but it dosent work properly, although it did shift the white point of my screen. Here is the shader chatgpt cooked based on the icc dump data i provided it. `#version 100 precision mediump float; uniform sampler2D tex; // Color transformation matrix // Gamma correction value (from rTRC, gTRC, bTRC) vec3 applyColorMatrix(vec3 color) { vec3 applyGammaCorrection(vec3 color) { void main() {
}` |
@babul09 |
I'm surprised no one has made a 3DLUT shader using a PNG like Reshade, libretro or some art applications like i think blender as a compromise until Color Management actually reaches wayland/hyprland/AMDGPU, this of course has the downside of being on all monitors until hyprland's shader API gets more developed but a option is better than none.
This'll probably be better in some ways as i believe the AMDGPU Display Core driver will be limited to 9^3 or 17^3 ICCs, far from the biggest which is 65^3(in DisplayCAL, though this is probably overkill by a huge margin),
You could make an arbitrary PNG in a 3DLUT format to apply whatever colors you want if you wanted to for some reason.
Currently this is the only thing holding me back from using wayland/hyprland and it'd be nice to at least see some solution for it, even if i have to do it myself but i'd need some pointers as i know nothing of GLSL, if this requires some C or other backend code or how i'd integrate it into hyprshade(if needed).
The text was updated successfully, but these errors were encountered: