-
Notifications
You must be signed in to change notification settings - Fork 193
Conversation
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.
Thanks for your contribution, there are some problems with some parts of it and some code could be improved but overall it's on the right track.
You should add a test (math-functions.wgsl
seems like a good place).
Also the spec you point to is outdated, the newer version is at https://gpuweb.github.io/gpuweb/wgsl/#saturate-float-builtin
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.
Thanks, everything looks great now, there seems to be problems with clippy not related to your changes, I'll fix them and then we can merge your PR (you might need to rebase).
Cool, I’ll be on the lookout 👀 |
Thanks for you work, I've gone ahead and rebased it so now it's ready to be merged |
Adds saturate and converts it to
clamp(e, 0.0, 1.0)
where necessary.