y4my4my4m / kde-shader-wallpaper

KDE / Plasma - Shader Wallpaper plugin
GNU General Public License v3.0
247 stars 13 forks source link

can't use .qml files anymore in KDE 6? #59

Closed SampoVirtanen closed 4 months ago

SampoVirtanen commented 4 months ago

I used to have the KDE 5 version of this, and have a couple shaders I switched between regularly, all in .qml format. I recently updated to KDE 6, and it seems the preloaded shaders are .qsb files instead of .qml files now. I tried to load my old .qml shaders and they don't seem to load (weren't even shown in the file picker with "shader files" selected.) Is this intentional, a limitation of switching to KDE 6 and thus Qt6, or a bug? If it's not fixable, is there a way to convert my .qml shaders to .qsb? Sorry if this is a stupid question to someone with more knowledge, I have no clue about how shaders work, and just like the funny moving wallpapers. Thanks in advance for help.

y4my4my4m commented 4 months ago

@SampoVirtanen No, you can't.

QT6 changed things, now shaders need to be compiled, you can't pass a shader string anymore. I've however created a guide that helps transforming from .frag to .qsb

Check this to find out how: https://github.com/y4my4my4m/kde-shader-wallpaper/blob/plasma6/README_DEV.md

I recommend manual import as the automatic one is poorly made.

SampoVirtanen commented 4 months ago

Thanks for the link to the guide. Do I have to convert the .qml to frag first or are they already the same type of shader, just with a different file extension?

y4my4my4m commented 4 months ago

@SampoVirtanen .qml files were only used in the first version and i've been using .frag ever since in later releases. The QML shader files were essentially just wrappers for the frag text.

What you need to do is make your file as a standard GLSL file (just the frag shader information) and compile it.