Add smoothstep node#4189
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new smoothstep node in the math library to perform smooth Hermite interpolation. The review feedback points out a documentation error where edge_max is incorrectly described as mapping values above it to 0 instead of 1. Additionally, the feedback identifies a potential division-by-zero/NaN propagation issue when edge_min equals edge_max, and notes that the indentation of the new code should be updated to use tabs instead of spaces.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
2 issues found across 1 file
Confidence score: 3/5
- There is a concrete regression risk in
node-graph/nodes/math/src/lib.rs: whenedge_min == edge_max, the denominator becomes0.0, yieldingNaNthat can propagate through clamp and downstream math. - Given the severity (7/10) and high confidence, this is user-impacting behavior rather than a cosmetic issue, so merge risk is moderate until guarded.
- A secondary issue in
node-graph/nodes/math/src/lib.rsis documentation mismatch foredge_max(docs say outputs map to0, while smoothstep behavior maps above the upper edge to1). - Pay close attention to
node-graph/nodes/math/src/lib.rs- add a zero-width-edge guard and alignedge_maxdocs with actual smoothstep output.
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Add smoothstep node, as per OpenGL reference.