Skip to content

Conversation

@msuzuki-nvidia
Copy link
Contributor

This PR adds GLSL and MDL implementations for the flake nodes proposed in #2609.

Nodes to add:

  • <flake2d>
  • <flake3d>

@@ -1,4 +1,5 @@
#define M_FLOAT_EPS 1e-8
#define M_PI 3.1415926535897932
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metal defines M_PI_F along with other constants - if you'd be to defining it that way we could avoid specifying it all in mx_math.metal.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

M_PI is already used here (but can't reference it from stdlib) so I think we want to keep this for consistency.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK - then maybe it makes sense in mx_math.metal to say

#define M_PI M_PI_F

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, done.

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

Successfully merging this pull request may close these issues.

2 participants