wlrfx / scenefx Goto Github PK
View Code? Open in Web Editor NEWA drop-in replacement for the wlroots scene API that allows wayland compositors to render surfaces with eye-candy effects
License: MIT License
A drop-in replacement for the wlroots scene API that allows wayland compositors to render surfaces with eye-candy effects
License: MIT License
Hello, when I built the example tinywl, it's failed. It seems that there are missing headers.
#include <types/fx/shadow_data.h>
......
#include "types/wlr_scene.h"
#include "render/fx_renderer/fx_renderer.h"
Is it intentional ? Thanks.
This will help in ffi scenarios instead of passing the struct.
Blocker for qtile MR.
Borders will be very hard for compositors to draw on clients that have rounded corners and / or shadows. We should include some border rendering logic as part of scenefx to make this simple.
since I'm new to topic of Wayland compositors and i started to use labwc to my main window manager but i want change the lock using this project.
can anyone help me please !
We should add the box shadows from upstream SwayFX to scenefx
We need to get tinywl working with our local version of wlr_scene
The flake.nix should be clean + minimal like the swayfx flake.nix. Auto setting up the wlroots subproject is one must here.
I may have over trimmed the include/meson.build
file. We should ensure that it is appropriately set up
Chase the 0.17.0 impl of wlroots for rendering improvements.
The fact that box_shadow color a float *
instead of just a float [4]
is problematic.
Wrapping that in FFI is clunky because essentially in zig I need to wrap it as: *f32[4]
which might as well just be f32[4]
.
Not to mention other languages where that kind of pointer arithmetic is usually not suggested. Eg: Python
Why can't we approach it as just float [4]
?
More or less a tracking issue of https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3393. We should try to solve this upsteam, and then on our end, pass the decoration data the same way that opacity is passed.
If we want scenefx to be adopted by other compositors, we should get some branding and create a README! benchmarks should also be included
For some reason, scenefx failed to compile with Slackware 15.0.
C compiler for the host machine: ccache cc (gcc 11.2.0 "cc (GCC) 11.2.0")
C linker for the host machine: cc ld.bfd 2.37-slack15
Host machine cpu family: x86_64
Host machine cpu: x86_64
Compiler for C supports arguments -Wundef: YES
Compiler for C supports arguments -Wlogical-op: YES
Compiler for C supports arguments -Wmissing-include-dirs: YES
Compiler for C supports arguments -Wold-style-definition: YES
Compiler for C supports arguments -Wpointer-arith: YES
Compiler for C supports arguments -Winit-self: YES
Compiler for C supports arguments -Wstrict-prototypes: YES
Compiler for C supports arguments -Wimplicit-fallthrough=2: YES
Compiler for C supports arguments -Wendif-labels: YES
Compiler for C supports arguments -Wstrict-aliasing=2: YES
Compiler for C supports arguments -Woverflow: YES
Compiler for C supports arguments -Wmissing-prototypes: YES
Compiler for C supports arguments -Walloca: YES
Compiler for C supports arguments -Wno-missing-braces: YES
Compiler for C supports arguments -Wno-missing-field-initializers: YES
Compiler for C supports arguments -Wno-unused-parameter: YES
Compiler for C supports arguments -fmacro-prefix-map=/prefix/to/hide=: YES
Found pkg-config: YES (/usr/bin/pkg-config) 0.29.2
Run-time dependency wayland-server found: YES 1.22.0
Run-time dependency wlroots found: YES 0.17.3
Run-time dependency libdrm found: YES 2.4.121
Run-time dependency xkbcommon found: YES 1.3.1
Run-time dependency pixman-1 found: YES 0.43.4
Library m found: YES
Library rt found: YES
Run-time dependency wayland-protocols found: YES 1.32
Build-time dependency wayland-scanner found: YES 1.22.0
Program /usr/bin/wayland-scanner found: YES (/usr/bin/wayland-scanner)
Run-time dependency egl found: YES 1.5
Run-time dependency gbm found: YES 21.3.5
Run-time dependency glesv2 found: YES 3.2
Program ./embed.sh found: YES (/bin/sh -eu /home/lancs/build/DWL/scenefx/scenefx/render/fx_renderer/gles2/shaders/./embed.sh)
Build targets in project: 123
[128/145] Compiling C object libscenefx.so.1.p/render_fx_renderer_pixel_format.c.o
FAILED: libscenefx.so.1.p/render_fx_renderer_pixel_format.c.o
ccache cc -Ilibscenefx.so.1.p -I. -I.. -Iinclude -I../include -Iprotocol -Irender/fx_renderer/gles2/shaders -I/usr/include/pixman-1 -I/usr/include/elogind -I/usr/include/libdrm -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -std=c11 -O3 -DWLR_USE_UNSTABLE -DWLR_LITTLE_ENDIAN=1 -DWLR_BIG_ENDIAN=0 -Wundef -Wlogical-op -Wmissing-include-dirs -Wold-style-definition -Wpointer-arith -Winit-self -Wstrict-prototypes -Wimplicit-fallthrough=2 -Wendif-labels -Wstrict-aliasing=2 -Woverflow -Wmissing-prototypes -Walloca -Wno-missing-braces -Wno-missing-field-initializers -Wno-unused-parameter -fmacro-prefix-map=../= -O2 -fPIC -fPIC -MD -MQ libscenefx.so.1.p/render_fx_renderer_pixel_format.c.o -MF libscenefx.so.1.p/render_fx_renderer_pixel_format.c.o.d -o libscenefx.so.1.p/render_fx_renderer_pixel_format.c.o -c ../render/fx_renderer/pixel_format.c
In file included from ../render/fx_renderer/pixel_format.c:4:
../include/render/fx_renderer/fx_renderer.h:159:17: error: unknown type name ‘PFNGLGETINTEGER64VEXTPROC’
159 | PFNGLGETINTEGER64VEXTPROC glGetInteger64vEXT;
| ^~~~~~~~~~~~~~~~~~~~~~~~~
[129/145] Compiling C object libscenefx.so.1.p/render_egl.c.o
ninja: build stopped: subcommand failed.
A few points from the scenefx patch notes on dwl:
NOTE: Some GTK apps are being cut off when they have shadows enabled. You can use the shadow_ignore_list option to prevent shadows from being rendered on those apps
NOTE: Blur doesn't work on windows with opacity set (opacity_active, opacity_inactive)
NOTE: In DWL's Makefile scenefx must be placed before wlroots, e.g. PKGS = scenefx wlroots wayland-server ...
For some reason, I can't seem to get scenefx to properly compile - i've tried multiple wlroots version, from 0.17.0 to 0.17.3, all fail close to the end. I've made sure to enable all options of wlroots to make sure I have everything.
Here is the compile log for scenefx: Compile Log
As far as I can tell, I do have all the necessary dependencies as listed in the readme
Run https://github.com/ErikReider/fx-comp and launch like this fx-comp -s foot
.
The damage is a bit wonky atm due to the old region not being expanded?
We could eliminate some complexity (and potentially gain some performance) if we try a shadow matte implementation - similar to hyprland's: https://github.com/hyprwm/Hyprland/blob/main/src/render/OpenGL.cpp#L1040-L1096
This would be dependent on neutral or positive rendering benchmark results
Just like wlr_renderer, we should have a vulkan implementation of our fx renderer.
This will be more important to implement once color management / HDR support is available in wlroots, as it looks like the GLES2 renderer there will be soft deprecated:
https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/3804
This is more of an feature request: when I used to use i3 I also used picom's legacy glsl shaders to turn my screen from RGB to grayscale, or invert the colours. Having looked at the source code for scenefx (after trying—and failing—to write a script that could modify gamma ramps in wlroots) I see that it uses gles fragment shaders.
So would it be possible to add that functionality to scenefx (and thus swayfx)?
Hello, I'm interested to try your library, which wlroots version is required ? Is 0.17.x okay ? Thanks.
Hello, it seems shaders.h
is missing (it's included but not installed) from /usr/include/scenefx/render/fx_renderer/fx_renderer.h
. I installed scenefx and check /usr/include/scenefx and the it doesn't exist. Is it normal ?
We should add the blur from upstream SwayFX to scenefx
A new unexpected release of wlroots just dropped, so we should probably support it. Shouldn't take long to fix :)
Found when testing in combination with SwayFX.
Setting blur_saturation 1
seems to resolve that
Blur settings active:
blur enable
blur_passes 3
meson.build
is now mostly the default from wlroots. Since scenefx is just a subset of wlroots, we should be able to trim down a lot of the meson.build
file.
Add effects like shadows and rounded corners to wlr_scene_rect
nodes
Vendor scenefx custom headers to make ffi easier for projects.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.