AcademySoftwareFoundation / AcademySoftwareFoundation/MaterialX
Proposal: Add standard library step functions
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 2.3k
- Forks
- 464
- Avg merge
- 4d 21h
- Merged PRs (30d)
- 11
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the MaterialX standard library and the existing ifgreater, smoothstep, split, and aastep functionality mentioned in the proposal. Resolve whether to add step and aastep as standard nodes or support tuple-capable comparison variants; done means the preferred design and resulting standard-library changes are agreed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100