Code Monkey home page Code Monkey logo

scenefx's Introduction

scenefx

wlroots is the de-facto library for building wayland compositors, and its scene api is a great stride in simplifying wayland compositor development. The problem with the scene api (for compositors looking for eye candy), however, is that it forces you to use the wlr renderer, which is powerful yet simple. SceneFX is a project that takes the scene api and replaces the wlr renderer with our own fx renderer, capable of rendering surfaces with eye-candy effects including blur, shadows, and rounded corners, while maintaining the benefits of simplicity gained from using the scene api.

Please note: while SceneFX is in use by SwayFX version 0.4, it is not yet ready for usage by other compositors. Please refer to the 1.0 milestone to track the remaining tasks for our stable 1.0 release

Installation

Compiling From Source

Install dependencies:

  • meson *
  • wlroots
  • wayland
  • wayland-protocols *
  • EGL and GLESv2
  • libdrm
  • pixman

* Compile-time dep

Run these commands:

meson setup build/
ninja -C build/

Install like so:

sudo ninja -C build/ install

Join our Discord

scenefx's People

Contributors

alexbakker avatar athrungithub avatar bl4ckb0ne avatar coderkalyan avatar ddevault avatar elyesh avatar emersion avatar erikreider avatar ifreund avatar johanmalm avatar kanetw avatar kennylevinsen avatar kragniz avatar nefsen402 avatar ozwaldorf avatar quantum5 avatar sevz17 avatar shinyzenith avatar vyivel avatar willpower3309 avatar ybakos avatar zzxyb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

scenefx's Issues

Branding and README

If we want scenefx to be adopted by other compositors, we should get some branding and create a README! benchmarks should also be included

Support user defined shaders

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)?

Add border drawing functionality

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.

Example tinywl : missing headers ?

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.

How use it ?

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 !

Fix some issues affecting compositor usage

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 ...

The example of tinywl becomes weird.

Hello, this morning I decided to try scenefx again and I found something weird with its example (tinywl). It seems get rotated 90 degree (clockwise). I have a screenshot below. Is it intentional or the tinywl not getting update ? Thanks.

20240413_12h09m48s_grim

Failed to compile: error: unknown type name ‘PFNGLGETINTEGER64VEXTPROC’

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.

Add box shadows

We should add the box shadows from upstream SwayFX to scenefx

Wlroots 0.18

A new unexpected release of wlroots just dropped, so we should probably support it. Shouldn't take long to fix :)

Add blur

We should add the blur from upstream SwayFX to scenefx

Improve process to pass box shadow color.

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]?

Fail to compile with wlroots 0.17.1 (scenefx 0.1)

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.

image

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.