-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[example] Add shaders_rounded_rectangle example #4719
Conversation
I've added a commit to combine the three shaders into one shader as requested, and I have also gone ahead and defined two functions to make the code a bit more organized in an easy-to-digest manner |
// Thanks to Iñigo Quilez (https://www.iquilezles.org/www/articles/distfunctions/distfunctions.htm) | ||
// And thanks to inobelar (https://www.shadertoy.com/view/fsdyzB) for shader | ||
// MIT License | ||
float RoundedRectangleSDF( |
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.
Please, could you align parameters in a single line?
@anstropleuton Hi! I added some points to review! |
@anstropleuton thanks for this new example! |
Add a new shader example: shaders_rounded_rectangle!
This example demonstrates how to use three shaders to create a rounded rectangle with shadow and border. Thanks to Iñigo Quilez for providing Signed Distance Functions for the rounded rectangle!
Screenshot:
Regarding the edit on example template:
Missing/TODO: