config: add rounded corner exponent option#4006
Conversation
|
gosh the squircle looks so good !!! |
|
|
||
| // Manual smoothstep() between radius - half_px and radius + half_px | ||
| // to avoid a division in clamp(). | ||
| float t = clamp((dist - radius) * niri_scale + 0.5, 0.0, 1.0); |
There was a problem hiding this comment.
one unfortunate part is that this will undo my efforts to make these shaders fit on a eee pc
There was a problem hiding this comment.
So the smoothstep() function is a no-go?
There was a problem hiding this comment.
i removed it to save some ALU ops which made the resize shader fit. but i'm afraid with the superellipse fn you're adding many more ALU ops
There was a problem hiding this comment.
but i'm afraid with the superellipse fn you're adding many more ALU ops
In that case I have no idea then. I dont have any other formula in mind to solve this.
There was a problem hiding this comment.
maybe need to come up with some way to split these shaders or have some lightweight versions at least. for example rn the border shader doesn't fit into eee pc (so borders will always use solid color and have no rounded corners) but i think a lightweight version can remove all the color conversion stuff so at least there's rounded corners throughout
8c4b2c5 to
b06b73c
Compare
|
|
||
| window_geometry: Rectangle<f64, Logical>, | ||
| window_corner_radius: CornerRadius, | ||
| window_corner_exponent: f32, |
There was a problem hiding this comment.
Also, I'm not sure if this is needed, since the shadow and window's corner exponent will always be the same anyway.
b06b73c to
532c6d1
Compare
Add option for rounded corner exponent, which allows user to make their corners "chamfered" or "squircle"
One minimal issue I see is that the slanted edge of a chamfered corner has slightly thinner border. This is probably fixable but I'm not really familiar with shader so I wasnt able to. Any help is appreciated.