Skip to content

gradient support! #65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Oct 28, 2024
Merged

gradient support! #65

merged 10 commits into from
Oct 28, 2024

Conversation

ameliasquires
Copy link
Contributor

added fx_render_pass_add_rect_grad, fx_render_pass_add_rounded_rect_grad, and fx_render_pass_add_rounded_grad_border_corner. all with associated shaders, structs, and linking functions.

all gradients support as many colors as you want (dynamic shader compilation), linear/conic variants, and rotation (in degrees)

@ameliasquires ameliasquires marked this pull request as draft October 10, 2024 22:37
@WillPower3309
Copy link
Member

This is huge! Thanks a ton for the PR. Feel free to ping me directly when it's ready for review

@ameliasquires ameliasquires marked this pull request as ready for review October 24, 2024 17:47
Copy link
Member

@WillPower3309 WillPower3309 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One Q and one nit. Otherwise looks great! Clean PR

@@ -27,6 +27,20 @@ struct fx_gles_render_pass *fx_renderer_begin_buffer_pass(struct wlr_renderer *w
struct wlr_buffer *wlr_buffer, struct wlr_output *output,
const struct wlr_buffer_pass_options *options);

struct fx_gradient {
float degree;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the bounds of this?


float rad = radians(degree);

if(linear){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: please match the bracket spacing throughout the shaders here with the existing format we have in our other shaders

@WillPower3309 WillPower3309 merged commit 88c485b into wlrfx:main Oct 28, 2024
@IDKnix
Copy link

IDKnix commented Oct 28, 2024

lets go it got merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants