bevy_smud icon indicating copy to clipboard operation
bevy_smud copied to clipboard

Allow supplying a dynamic number of positions

Open porky11 opened this issue 3 years ago • 1 comments

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.

porky11 avatar Oct 01 '22 16:10 porky11

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 :/

johanhelsing avatar Oct 01 '22 19:10 johanhelsing