Fix edge color clamping in artistic_ior - #3078
jstone-lucasfilm merged 3 commits into
Conversation
|
Thanks for taking this on, @SavaLione! This looks like a good fix, and the GLSL and OSL changes are exactly what I'd expect. I have one request on the MDL side before we merge, along with a suggestion on test coverage. On the MDL question you raised, this logic belongs in the MDL module rather than the implementation XML. The function body for Since each of the later versioned modules (1.7 through 1.11) re-exports this function from On test coverage, none of our current test materials drive Overall this looks like a great second contribution, and with the refinements above, I believe it should be ready to merge. |
f9ef544 to
eed6f82
Compare
Signed-off-by: Savelii Pototskii <savelii.pototskii@gmail.com>
Signed-off-by: Savelii Pototskii <savelii.pototskii@gmail.com>
Signed-off-by: Savelii Pototskii <savelii.pototskii@gmail.com>
eed6f82 to
ee85acd
Compare
|
Hi @jstone-lucasfilm , Thanks for the helpful information about the project's internal structure and how the MDL backend works. I have reverted all changes to the XML file and applied your suggested change to Also, I implemented a test case that checks this particular issue: The values for this test case are taken from the material mentioned in the initial issue (#3004), so it is possible to visually inspect the clamping on the gold surface. |
jstone-lucasfilm
left a comment
There was a problem hiding this comment.
Excellent work, @SavaLione, and this looks ready to merge.
artistic_ior
3d15323
into
AcademySoftwareFoundation:main

Summary
Hi,
This fixes the issue related to the green circle on some materials:
Three shaded backends were changed and tested: GLSL, OSL, and MDL.
I'm somewhat sure about the code for the GLSL and OSL shaders.
With the MDL shader, I'm not sure whether it is considered acceptable practice to add functions directly to the XML file.
Nevertheless, all tests completed successfully, and everything looks good to me (including the MDL backend).
Tests
I compiled MaterialX Viewer as a standalone application and as a web application using Emscripten.
The MDL backend was tested using the Nvidia MDL SDK (version 2026.0.2-391700.2276) and the supplied dxr.exe application in the examples.
Visually, everything looks OK.
Tests were successfully compiled and executed.
All 94 test cases passed (39629 assertions).
MaterialX Viewer web:

MDL before the fix:

MDL after the fix:
