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

@thi.ng/shader-ast-stdlib The worley2 HOF doesn't provide a way to change the name in generated code #399

Closed
JeffreyPalmer opened this issue May 3, 2023 · 3 comments

Comments

@JeffreyPalmer
Copy link

I'd like to be able to use both worleyDist and WorleyDistManhattan in the same program, but when I attempt to do so the generated code results in this error:

Uncaught Error: WebGL: Error compiling shader:
line 76: 'worley2' : function already has a body

I see that the additive HOF provides a way to override the name used in the generated code - perhaps we could do the same here?

(If there's a technique to avoid this, please let me know.)

@postspectacular
Copy link
Member

Thanks @JeffreyPalmer - I updated all higher order functions in this package and will do a new release later today...

@postspectacular
Copy link
Member

Just a heads up, @JeffreyPalmer that I did release the fix last night. Let me know if this helps and thanks again for reporting! :)

@JeffreyPalmer
Copy link
Author

Thanks @postspectacular! I saw that and have already incorporated the change in my code. Everything is working perfectly. 🙏

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

No branches or pull requests

2 participants