AcademySoftwareFoundation / AcademySoftwareFoundation/MaterialX
Graph Editor: loading material with invalid connections / type mismatches
- Dominant language
- C++
- Stars
- 2.3k
- Forks
- 451
- Avg merge
- 6d 6h
- Merged PRs (30d)
- 5
Description
Hi,
again codegen produced some invalid MaterialX code where we connect a color4 node to a color3 output.
The GraphView happily displays this connection when opening the file

I'm only getting an error when trying to pipe the output then into the shader

Problematic material:
```mtlx
```
Also attaching a video illustrating the issue
note that the invalid connection is correctly refused in the UI when trying to do it but not when loading the graph
also note that when I connect the subgraph output to the shader we get compiler errors and rendering breaks due to the type mismatch
https://github.com/AcademySoftwareFoundation/MaterialX/assets/5083203/62136046-aa6e-4142-b01c-cfd0ef7380e3
Contributor guide
Research direction
Start by loading the problematic MaterialX document in the GraphView and trace the graph-loading path for connection validation. Compare its behavior with the UI's refusal of the same color4-to-color3 connection; done means invalid connections are rejected during loading before they reach shader compilation or rendering.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100