AcademySoftwareFoundation / AcademySoftwareFoundation/OpenPBR
MaterialX OpenPBR Surface node definition natural logarithm (ln) function could be undefined
- Dominant language
- CSS
- Stars
- 793
- Forks
- 44
- PR merge metrics
- No merged PRs in 30d
Description
We noticed an issue with the MaterialX OpenPBR Surface node definition:
https://github.com/AcademySoftwareFoundation/OpenPBR/blob/b212785f1e35462853c7d455ae5a41f8ce71bf98/reference/open_pbr_surface.mtlx#L221
If one of the components of transmission_color_vector is <= 0, then the result of the natural logarithm (ln) function is mathematically undefined:
```
```
You might want to prevent such a case by using:
```
```
A condition could do, too. It might also be okay as is if you want to rely on the renderer to handle NaN/Inf on a per sample basis.
Contributor guide
No contributing guide indexed for this repository
Research direction
Inspect reference/open_pbr_surface.mtlx around line 221 and trace how transmission_color_vector feeds the natural logarithm. Determine whether non-positive components should be clamped, conditionally handled, or explicitly allowed, then update the node definition or its documented behavior so the chosen handling is unambiguous.
Written by the indexing model from the issue text.
Assessment
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100