Closed fishman closed 2 months ago
Thanks for the work here! We'd like to use the 1.9 release to transition our fx_renderer to use the fx_renderer we've built in scenefx, which will have feature parity with the fx_renderer bundled in swayfx. As part of that, we will simply just have to import fx_renderer from scenefx and it should be plug and play for that portion of the rebase.
I'm going to make a few additions to this branch to move along some of the WIP parts, I hope you don't mind :)
Should just be render.c that needs fixing now
Relies on the swayfx-compat
scenefx branch
right now it is sort of functional but black screens a lot with
00:00:19.617 [wlr] [render/swapchain.c:98] No free output buffer slot
Once the buffer slot issue is fixed, we can start adding back some of the eye candy (lots of TODOs)
Seems like there's a lot of missing code from sway 1.9, like the root.c file not compiling without manually copy/pasting the contents from sway 1.9
Event.WINDOW subscribed
Event.MODE subscribed
err: wayland.c:1470: no compositor00:00:00.486
[swaynag/swaynag.c:441] failed to register with the wayland display
New fun bug!
Not sure if the rebase was applied correctly
All that's left now are adding back the compositor effects in render.c (see the many TODOs), and scenefx
Shadow offset and blur is now in :)
So this is what's left (feel free to edit this comment with additional features that I've missed):
So this is what's left (feel free to edit this comment with additional features that I've missed):
- [ ] Expose fx_renderer as public?
- [ ] Window corners
- [ ] Rounded rects
- [ ] Border corners
- [ ] Titlebar bottom broder compensation
Yup! We should also test everything scaled + rotated.
The bottom border compensation works but also applies when it shouldn't. Will fix tomorrow
scaled shadow damage tracking is broken
While it would be best to hide the fx_renderer implementation details, we will likely need to expose fx_renderer as public before scene is ready
I'm not opposed to backporting scene changes from mainline sway to swayfx early (but only after this is merged)
also need to discuss dimming + saturation. Personally I am starting to think we should deprecate saturation
Personally I am starting to think we should deprecate saturation
Agreed! Not really that useful due to direct scanout needing to be disabled
Was there a feature for using custom shaders? If so, that would supersede custom saturation, wouldn't it?
Was there a feature for using custom shaders? If so, that would supersede custom saturation, wouldn't it?
Yup! We have an open issue for it, but don't have an implementation yet. It would be possible to get saturation with custom shaders, but wouldn't work on Fullscreen windows due to direct scan out
titlebars mostly done, need to properly render the border corners and the tabbed edge container titlebars
ok! All that is left is scaled + rotated effects. Right now there are a couple issues on the scenefx side that I have called out in that PR as well
Shadow scaling mostly fixed, some weird effects between windows evident:
Fine-grained TODO:
has_titlebar
= true)Found another issue, when moving a floating window the bottom border can be 1 px off in some positions - likely a rounding issue
EDIT: probably just https://github.com/WillPower3309/swayfx/issues/113
We need to have a discussion on if we should keep scaling in the scene side or make it a compositor responsibility
Annoying shadow issue when there are no borders (1px wide black "border" between window and shadow, stencil issue?):
Annoying shadow issue when there are no borders (1px wide black "border" between window and shadow, stencil issue?):
Narrowed it down to the stencil smoothstep function acting up. Very strange since we're using the same logic in master 🥴
Edit: Nvm, seems to be present in master as well, so it's at least not a regression :)
Annoying shadow issue when there are no borders (1px wide black "border" between window and shadow, stencil issue?):
Narrowed it down to the stencil smoothstep function acting up. Very strange since we're using the same logic in master 🥴
Edit: Nvm, seems to be present in master as well, so it's at least not a regression :)
Ugh hopefully it'll be fixed once we switch to a matte
With that in mind I think we have feature parity with upstream swayfx now, @ErikReider do you mind giving the render logic another look through? I'll do the same before merging
Maybe a little bit off-topic, but will scenefx be tagged soon after or before this PR is merged? It will help a lot for distribution packagers.
Maybe a little bit off-topic, but will scenefx be tagged soon after or before this PR is merged? It will help a lot for distribution packagers.
Yup! As soon as the corresponding scene PR is merged I will tag a release
render layoer_shell, render, and seatop_move_tiling and fx_renderer are currentlyt he main things that seem to require major changes.