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

Proposal: Add standard library step functions #2128

Open
kwokcb opened this issue Dec 2, 2024 · 0 comments
Open

Proposal: Add standard library step functions #2128

kwokcb opened this issue Dec 2, 2024 · 0 comments

Comments

@kwokcb
Copy link
Contributor

kwokcb commented Dec 2, 2024

Proposal

It does not seem that there is a step function as part of the standard library. At least I could not find them. You can do it with ifgreater or a degenerate form of smoothstep (high == low) but it more expensive or troublesome.

As this is an intrinsic in languages like GLSL (variants) nd OSL, adding a proposal that step be added.

If not an intrinsic it would be useful to add supporting ifgreater or (ifless) definition variants which work with tuples to avoid having to add explicit separate and combine nodes.

Note that some implementations like split use aastep which allows a filter width for anti-aliasing. step and aastep would both be useful as standard nodes.

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

1 participant