Repository navigation
Add a GLSL render test for noisy_squares2d - #103
Merged
Merged
Conversation
Brings in metashade/metashade#281, which adds the noisy_squares2d procedural node and the floor intrinsic. Signed-off-by: Pavlo Penenko <pavlo.penenko@autodesk.com>
Metashade doesn't generate this node for OSL yet, so the test renders with GLSL only. Signed-off-by: Pavlo Penenko <pavlo.penenko@autodesk.com>
Member
Author
There was a problem hiding this comment.
🟡 Changes recommended
The new regression test lacks @pytest.mark.glsl, so running with -m glsl skips it entirely.
1 open issue
What changed in this PR
Adds GLSL regression coverage for noisy_squares2d in MaterialX’s Metashade integration, following the existing procedural-node tests.
Changes:
- Adds a GLSL-only test using the node’s default inputs.
- Adds the generated node library, an unlit material, and reference shaders.
- Documents the new test environment and reference paths.
| File | Description |
|---|---|
contrib/tests/test_render_metashade.py |
Adds the GLSL-only test class. |
contrib/tests/README.md |
Documents test scope and reference locations. |
contrib/tests/metashade_ref/renders/noisy_squares2d/metashade/noisy_squares2d/noisy_squares2d_vs.glsl |
Adds the vertex shader baseline with UV0 forwarding. |
contrib/tests/metashade_ref/renders/noisy_squares2d/metashade/noisy_squares2d/noisy_squares2d_ps.glsl |
Adds the fragment shader baseline for the cell pattern. |
contrib/tests/metashade_ref/materials/noisy_squares2d/noisy_squares2d.mtlx |
Connects the default-input node to an unlit material. |
contrib/tests/metashade_ref/libraries/noisy_squares2d/test_noisy_squares2d_genglsl_impl.mtlx |
Binds the node definition to its GLSL implementation. |
contrib/tests/metashade_ref/libraries/noisy_squares2d/test_noisy_squares2d_genglsl_impl.glsl |
Adds the generated pattern function and MaterialX wrapper. |
contrib/tests/metashade_ref/libraries/noisy_squares2d/test_noisy_squares2d_defs.mtlx |
Defines the node with default UV0 coordinates and scale. |
Review effort: Balanced
Only the _AllBackends classes got backend markers, so -m glsl selected 2 of the 190 tests. The base class's default backend fixture now carries the glsl marker, like _AllBackends does per backend. The pruned adsk class hard-codes GLSL in its own fixtures, so it's marked explicitly. Signed-off-by: Pavlo Penenko <pavlo.penenko@autodesk.com>
Signed-off-by: Pavlo Penenko <pavlo.penenko@autodesk.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Renders the
noisy_squares2dnode from metashade/metashade#281, like thejulia2dtest:contrib/metashadeto the head of Added fixes for code gen python bindings AcademySoftwareFoundation/MaterialX#281, which adds the node and thefloorintrinsic;metashade_ref/libraries/noisy_squares2d/, a material inmetashade_ref/materials/noisy_squares2d/that leaves the inputs at their defaults, andTestRenderMetashadeNoisySquares2d, with the reference shaders.GLSL only: Metashade's OSL target doesn't support the
Float2arithmetic the node uses yet, so the class doesn't use_AllBackends.The submodule points at a commit on the AcademySoftwareFoundation#281 branch. Once AcademySoftwareFoundation#281 merges, I'll retarget it to the merge commit on
mainbefore this PR merges.Tested by rendering in developer mode, then running
test_render_metashade.py --no-renderwith a temporary output directory: 190 passed.