danyspin97 / wpaperd

Modern wallpaper daemon for Wayland
GNU General Public License v3.0
332 stars 26 forks source link

lower minimum GLSL ES version to 3.10 #88

Closed sysedwinistrator closed 2 months ago

sysedwinistrator commented 2 months ago

While testing https://github.com/danyspin97/wpaperd/pull/87 on my Lenovo Duet Chromebook (Mediatek MT8183 SoC, ARM Mali-G72 MP3 GPU) running NixOS, I got an error message that GLSL ES 3.20 is required while my machine only supports 3.10:

The application panicked (crashed).
Message:  vertex shader creation succeed: 
   0: 0:2(10): error: GLSL ES 3.20 is not supported. Supported versions are: 1.00 ES, 3.00 ES, and 3.10 ES

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
Location: daemon/src/render/renderer.rs:437

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

While I have absolutely no idea about GLSL shaders or graphics programming; I thought it to be strange that a machine that can run 3D games would not be able to render a simple background image transition. So I just gave it a try and lowered the minimum version to 310, and it works. I don't know, maybe an even lower version would also work?

danyspin97 commented 2 months ago

While I have absolutely no idea about GLSL shaders or graphics programming; I thought it to be strange that a machine that can run 3D games would not be able to render a simple background image transition. So I just gave it a try and lowered the minimum version to 310, and it works. I don't know, maybe an even lower version would also work?

Yes, on paper it should work. However, I had some issues while converting the shaders to older openGL ES versions, because some of the things I am currently using are missing and a couple of things work in a completely different way. The other issue is that the various transition animations taken from gl-transition don't work with an older version (at least not all of them).

Here you can see that the current openGL ES version pulled is 2.0, so the only thing missing is adjusting the shaders. In the meanwhile, let's lower to #version 310es. In the future, I hope wpaperd uses #version 100es or has a runtime check for the minimum supported version.

Thank you for the PR!