AcademySoftwareFoundation / AcademySoftwareFoundation/MaterialX
CodeGen : Proposal to Provide a way to mapping between named stream sets and numbered stream sets
- Dominant language
- C++
- Stars
- 2.3k
- Forks
- 451
- Avg merge
- 6d 6h
- Merged PRs (30d)
- 5
Description
## Issue
Currently there is no way to specify a formal mapping between named and numbered geometric stream sets.
This would allow support for `geompropvalue` nodes and nodes like `texcoord`, `tangent` `geomcolor`, `bitanget` for instance which are named and numbered set specifiers respectively.
This issue is spawned from https://github.com/AcademySoftwareFoundation/MaterialX/issues/1486
## Proposal (WIP)
Initial thoughts: ( from that issue this comment from @JGamache-autodesk )
> Your suggestion to add some name-based helper code in the shadergen is a great idea! I like it.
>
> One way to do it would have the [TexcoordNodeGlsl](https://github.com/AcademySoftwareFoundation/MaterialX/blob/main/source/MaterialXGenGlsl/Nodes/TexCoordNodeGlsl.cpp) behave like a [GeomPropValueNodeGlsl](https://github.com/AcademySoftwareFoundation/MaterialX/blob/main/source/MaterialXGenGlsl/Nodes/GeomPropValueNodeGlsl.cpp) whenever a preference for name based UVs is declared in the GenOptions. That options could point to a std::function that would be provided by the downstream shadergen client to remap integer index to a name.
>
Contributor guide
Research direction
Read source/MaterialXGenGlsl/Nodes/TexCoordNodeGlsl.cpp and GeomPropValueNodeGlsl.cpp, then inspect the GenOptions entry point. Clarify the proposed formal mapping between named and numbered stream sets and how downstream shadergen clients would provide it. Done means the mapping supports the named and numbered node cases described in the issue.
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
- 30/100