Skip to content

Add a GLSL render test for noisy_squares2d - #103

Merged
ppenenko merged 4 commits into
metashade/devfrom
metashade/render-noisy-squares2d
Nov 11, 2026
Merged

ppenenko merged 4 commits into
metashade/devfrom
metashade/render-noisy-squares2d

Conversation

@ppenenko

Copy link
Copy Markdown
Member

Renders the noisy_squares2d node from metashade/metashade#281, like the julia2d test:

GLSL only: Metashade's OSL target doesn't support the Float2 arithmetic 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 main before this PR merges.

Tested by rendering in developer mode, then running test_render_metashade.py --no-render with a temporary output directory: 190 passed.

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>
@ppenenko
ppenenko requested review from feldstj and a balanced review from Copilot November 10, 2026 21:37
@ppenenko

Copy link
Copy Markdown
Member Author
image

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

Comment thread contrib/tests/test_render_metashade.py Resolved
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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are identified for the added GLSL noisy_squares2d render-test coverage.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

Signed-off-by: Pavlo Penenko <pavlo.penenko@autodesk.com>
@ppenenko
ppenenko merged commit b361b81 into metashade/dev Nov 11, 2026
31 of 36 checks passed
@ppenenko
ppenenko deleted the metashade/render-noisy-squares2d branch November 11, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants