-
Notifications
You must be signed in to change notification settings - Fork 12
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
Conversation
This is huge! Thanks a ton for the PR. Feel free to ping me directly when it's ready for review |
There was a problem hiding this 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; |
There was a problem hiding this comment.
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){ |
There was a problem hiding this comment.
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
lets go it got merged |
added
fx_render_pass_add_rect_grad
,fx_render_pass_add_rounded_rect_grad
, andfx_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)