Extract shaders from source#9600
Conversation
|
Thanks! This works as expected for me. |
7b04931 to
48b4ff3
Compare
|
wat da hail is "cm for blur" and shadow |
|
Blur uses a main fb which can be in HDR and modifies it like it is sRGB. So main fb -> sRGB. Without it you get a gray smudge in HDR mode. Basically everything that has some color should go through CM before going to main fb. |
|
should be - if (shader == &m_RenderData.pCurrentMonData->m_shCM && !usingFinalShader && (texType == TEXTURE_RGBA || texType == TEXTURE_RGBX)) {
+ if (shader == &m_RenderData.pCurrentMonData->m_shaders->m_shCM && !usingFinalShader && (texType == TEXTURE_RGBA || texType == TEXTURE_RGBX)) { |
26c31c2 to
1d485e6
Compare
|
this is not really what I envisioned for extracting shaders from source. My idea was more along the lines of: CShader({
.vertex = false,
.type = TEXTURE,
.cm = true,
.rounding = true
});which would build the string. But this is fine too, however:
Oi oi, does that mean hyprland will not launch without shaders installed to the system? That is not acceptable. |
One of the reasons to extract shaders was syntax highlighting and static checking.
It's there and supported (both 300 and 320).
I'll think of something. Probably won't be as clean as I'd like it to be. |
hm, fair, tho syntax highlighting for shaders aint that important |
d6bbbf8 to
0a11932
Compare
This reverts commit 52f80d6.
ef41f06 to
cb5bf76
Compare
* simplify and fix hdr metadata setting * keep incorrect(?) cm skip till hyprwm#9600
* simplify and fix hdr metadata setting * keep incorrect(?) cm skip till #9600
|
This seems to cause a regression in #9795 for me according to a bisect. Not a huge deal but hopefully fixable |
--------- Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
* simplify and fix hdr metadata setting * keep incorrect(?) cm skip till hyprwm#9600
--------- Co-authored-by: Mihai Fufezan <mihai@fufexan.net>
Describe your PR, what does it fix/add?
Extracts shaders from source code to reloadable and overridable assets. Shader assets can be overridden in
~/.config/hypr/shaders.Adds a simple shader
#includeprocessor.Adds
hyprctl reloadshadersto reload shaders.Fixes CM for some effects.
Addsrender:use_color_managementto disable proto and use old shaders. Requires restart.Lowers es version requirement #9655
Fixesrender:cm_fs_passthroughand changes the default to 2 - passthrough only HDR content. #9680Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)
GL_ARB_shading_language_includeis not used, it's enabled for ide shader linting.#includesupports only predefined set of filenames.Some other shaders might need a CM support.
When testing a local build without installation shaders should be copied/linked to~/.config/hypr/shaders(any installed shaders will have higher priority than builtin ones)Might need meson install fix. Plugins relying on in-source shader constants will be broken #9619preBlurForCurrentMonitorisn't called when CM settings change.Is it ready for merging, or does it need work?
Ready