Skip to content
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

Allow supplying a dynamic number of positions #17

Open
porky11 opened this issue Oct 1, 2022 · 1 comment
Open

Allow supplying a dynamic number of positions #17

porky11 opened this issue Oct 1, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@porky11
Copy link

porky11 commented Oct 1, 2022

It seems like currently only one dynamic position is supplied to the sdf function.
I would prefer if the user could define how many dynamic positions you supply to each shader.
At least up to 4 positions would be necessary for common bezier curves. Having dynamic curves is pretty important for my use cases.

@johanhelsing johanhelsing added the enhancement New feature or request label Oct 1, 2022
@johanhelsing
Copy link
Owner

johanhelsing commented Oct 1, 2022

Hi, this is similar to #3. #5 is what I use for a similar use case, but it only sends a vec4, in which you could pack two vec2's so you have 4 positions total.

It's not the most scalable or pretty solution, though. So if you have suggestions of how to add an ergonomic API for adding a dynamic number of arguments, I'm very interested.

EDIT: sorry, I think I made a booboo, you probably need more 2 positions more, so #5 won't work for you :/

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

No branches or pull requests

2 participants