Skip to content

Enable all Adsk materials in Metashade Standard Surface - #62

Merged
ppenenko merged 1 commit into
metashade/devfrom
metashade/inline-rotate-helper
Aug 25, 2026
Merged

Enable all Adsk materials in Metashade Standard Surface#62
ppenenko merged 1 commit into
metashade/devfrom
metashade/inline-rotate-helper

Conversation

@ppenenko

Copy link
Copy Markdown
Member

Summary

With this PR, every Adsk and ASWF material compiles and renders successfully through the Metashade Standard Surface codegen path — no more exclusions.

Root cause

MaterialX has a deduplication gap between _includes (from #include directives) and _sourceDependencies (from SourceCodeNode registrations). When Metashade SS includes mx_rotate_vector3.glsl and a material's nodegraph also uses rotate3d, the generator emits the function twice, causing GLSL compilation errors. The workaround inlines a private copy with a unique name.

Tracked upstream in metashade/metashade#230.

Test plan

  • All 55 Metashade render tests pass (22 ASWF + 33 Adsk)
  • Zero exclusions remaining

@ppenenko
ppenenko force-pushed the metashade/inline-rotate-helper branch from 10d8b61 to 695c77a Compare August 25, 2026 19:46
@ppenenko
ppenenko changed the base branch from metashade/html-report-all-tests to metashade/dev August 25, 2026 19:50
@ppenenko
ppenenko force-pushed the metashade/inline-rotate-helper branch from 695c77a to c03ba36 Compare August 25, 2026 19:52
Update the Metashade submodule to include:
- GLSL float intrinsics: sin, cos, radians (metashade/metashade#231)
- Inlined private rotate helper to avoid duplicate definitions
  when materials use rotate3d nodes (metashade/metashade#232)

Remove all entries from _ADSK_METASHADE_EXCLUDE — every Adsk and
ASWF material now compiles and renders successfully through the
Metashade Standard Surface codegen path.

Regenerate all render reference shaders (63 modified, 22 new).

Signed-off-by: Pavlo Penenko <pavlo.penenko@autodesk.com>
@ppenenko
ppenenko force-pushed the metashade/inline-rotate-helper branch from c03ba36 to c439514 Compare August 25, 2026 19:55
@ppenenko
ppenenko requested a balanced review from Copilot August 25, 2026 19:55

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.

Pull request overview

Updates Metashade Standard Surface generation to avoid duplicate rotate3d definitions and expands Adsk material coverage.

Changes:

  • Advances Metashade with GLSL trigonometric intrinsics and a private rotation helper.
  • Removes the eight explicit Adsk exclusions.
  • Regenerates shader baselines for ASWF and Adsk materials.

Reviewed changes

Copilot reviewed 68 out of 95 changed files in this pull request and generated no comments.

Show a summary per file
File Description
contrib/metashade Advances the Metashade submodule.
contrib/tests/test_render_metashade.py Removes explicit Adsk exclusions.
contrib/tests/metashade_ref/libraries/standard_surface/mx_metashade_standard_surface_bsdf_genglsl_impl.glsl Adds the private rotation helper.
contrib/tests/metashade_ref/renders/standard_surface/aswf/standard_surface_wood_tiled/Tiled_Wood_ps.glsl Regenerates the wood baseline.
contrib/tests/metashade_ref/renders/standard_surface/aswf/standard_surface_velvet/Velvet_ps.glsl Regenerates the velvet baseline.
contrib/tests/metashade_ref/renders/standard_surface/aswf/standard_surface_thin_film/ThinFilm_ps.glsl Regenerates the thin-film baseline.
contrib/tests/metashade_ref/renders/standard_surface/aswf/standard_surface_plastic/Plastic_ps.glsl Regenerates the plastic baseline.
contrib/tests/metashade_ref/renders/standard_surface/aswf/standard_surface_metal_brushed/Metal_Brushed_ps.glsl Regenerates the brushed-metal baseline.
contrib/tests/metashade_ref/renders/standard_surface/aswf/standard_surface_marble_solid/Marble_3D_ps.glsl Regenerates the marble baseline.
contrib/tests/metashade_ref/renders/standard_surface/aswf/standard_surface_look_wood_tiled/Tiled_Wood_ps.glsl Regenerates the tiled-wood look baseline.
contrib/tests/metashade_ref/renders/standard_surface/aswf/standard_surface_look_brass_tiled/Tiled_Brass_ps.glsl Regenerates the tiled-brass look baseline.
contrib/tests/metashade_ref/renders/standard_surface/aswf/standard_surface_jade/Jade_ps.glsl Regenerates the jade baseline.
contrib/tests/metashade_ref/renders/standard_surface/aswf/standard_surface_greysphere/Greysphere_ps.glsl Regenerates the greysphere baseline.
contrib/tests/metashade_ref/renders/standard_surface/aswf/standard_surface_gold/Gold_ps.glsl Regenerates the gold baseline.
contrib/tests/metashade_ref/renders/standard_surface/aswf/standard_surface_glass/Glass_ps.glsl Regenerates the glass baseline.
contrib/tests/metashade_ref/renders/standard_surface/aswf/standard_surface_glass_tinted/GlassTinted_ps.glsl Regenerates the tinted-glass baseline.
contrib/tests/metashade_ref/renders/standard_surface/aswf/standard_surface_default/Default_ps.glsl Regenerates the default baseline.
contrib/tests/metashade_ref/renders/standard_surface/aswf/standard_surface_copper/Copper_ps.glsl Regenerates the copper baseline.
contrib/tests/metashade_ref/renders/standard_surface/aswf/standard_surface_chrome/Chrome_ps.glsl Regenerates the chrome baseline.
contrib/tests/metashade_ref/renders/standard_surface/aswf/standard_surface_chess_set/M_Queen_W_ps.glsl Regenerates the white-queen baseline.
contrib/tests/metashade_ref/renders/standard_surface/aswf/standard_surface_chess_set/M_Queen_B_ps.glsl Regenerates the black-queen baseline.
contrib/tests/metashade_ref/renders/standard_surface/aswf/standard_surface_chess_set/M_Pawn_Top_W_ps.glsl Regenerates the white pawn-top baseline.
contrib/tests/metashade_ref/renders/standard_surface/aswf/standard_surface_chess_set/M_Pawn_Top_B_ps.glsl Regenerates the black pawn-top baseline.
contrib/tests/metashade_ref/renders/standard_surface/aswf/standard_surface_chess_set/M_Pawn_Body_W_ps.glsl Regenerates the white pawn-body baseline.
contrib/tests/metashade_ref/renders/standard_surface/aswf/standard_surface_chess_set/M_Pawn_Body_B_ps.glsl Regenerates the black pawn-body baseline.
contrib/tests/metashade_ref/renders/standard_surface/aswf/standard_surface_chess_set/M_Knight_W_ps.glsl Regenerates the white-knight baseline.
contrib/tests/metashade_ref/renders/standard_surface/aswf/standard_surface_chess_set/M_Knight_B_ps.glsl Regenerates the black-knight baseline.
contrib/tests/metashade_ref/renders/standard_surface/aswf/standard_surface_chess_set/M_King_W_ps.glsl Regenerates the white-king baseline.
contrib/tests/metashade_ref/renders/standard_surface/aswf/standard_surface_chess_set/M_King_B_ps.glsl Regenerates the black-king baseline.
contrib/tests/metashade_ref/renders/standard_surface/aswf/standard_surface_chess_set/M_Chessboard_ps.glsl Regenerates the chessboard baseline.
contrib/tests/metashade_ref/renders/standard_surface/aswf/standard_surface_chess_set/M_Castle_W_ps.glsl Regenerates the white-castle baseline.
contrib/tests/metashade_ref/renders/standard_surface/aswf/standard_surface_chess_set/M_Castle_B_ps.glsl Regenerates the black-castle baseline.
contrib/tests/metashade_ref/renders/standard_surface/aswf/standard_surface_chess_set/M_Bishop_W_ps.glsl Regenerates the white-bishop baseline.
contrib/tests/metashade_ref/renders/standard_surface/aswf/standard_surface_chess_set/M_Bishop_B_ps.glsl Regenerates the black-bishop baseline.
contrib/tests/metashade_ref/renders/standard_surface/aswf/standard_surface_carpaint/Car_Paint_ps.glsl Regenerates the car-paint baseline.
contrib/tests/metashade_ref/renders/standard_surface/aswf/standard_surface_brick_procedural/M_BrickPattern_ps.glsl Regenerates the brick baseline.
contrib/tests/metashade_ref/renders/standard_surface/aswf/standard_surface_brass_tiled/Tiled_Brass_ps.glsl Regenerates the brass baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Revit/wood/M_legacy_wood_vs.glsl Adds the wood vertex baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Revit/waves/M_legacy_waves_vs.glsl Adds the waves vertex baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Revit/water/M_legacy_water_ps.glsl Regenerates the water fragment baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Revit/wallpaint/M_legacy_wallpaint_ps.glsl Regenerates the wall-paint baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Revit/tiles/M_legacy_tiles_ps.glsl Regenerates the tiles baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Revit/stone/M_legacy_stone_ps.glsl Regenerates the stone baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Revit/speckle/M_legacy_speckle_vs.glsl Adds the speckle vertex baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Revit/plastic/M_legacy_plastic_ps.glsl Regenerates the plastic baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Revit/noise/M_legacy_noise_vs.glsl Adds the noise vertex baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Revit/mirror/M_legacy_mirror_ps.glsl Regenerates the mirror baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Revit/metallicpaint/M_legacy_metallicpaint_vs.glsl Adds the metallic-paint vertex baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Revit/metal/M_legacy_metal_vs.glsl Adds the metal vertex baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Revit/masonry/M_legacy_masonry_ps.glsl Regenerates the masonry baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Revit/marble/M_legacy_marble_vs.glsl Adds the marble vertex baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Revit/knurl/M_legacy_knurl_vs.glsl Adds the knurl vertex baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Revit/hardwood/M_legacy_hardwood_ps.glsl Regenerates the hardwood baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Revit/gradient/M_legacy_gradient_ps.glsl Regenerates the gradient baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Revit/glazing/M_legacy_glazing_ps.glsl Regenerates the glazing baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Revit/glass/M_legacy_glass_ps.glsl Regenerates the glass baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Revit/generic/M_legacy_generic_ps.glsl Regenerates the generic baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Revit/concrete/M_legacy_concrete_ps.glsl Regenerates the concrete baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Revit/checker/M_legacy_checker_ps.glsl Regenerates the checker baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Revit/ceramic/M_legacy_ceramic_ps.glsl Regenerates the ceramic baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Fusion/transparent/Gemstone_Ruby_ps.glsl Regenerates the ruby baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Fusion/transparent/Gemstone_Diamond_ps.glsl Regenerates the diamond baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Fusion/opaque/Walnut_Semigloss_ps.glsl Regenerates the semigloss-walnut baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Fusion/opaque/Walnut_ps.glsl Regenerates the walnut baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Fusion/opaque/Plastic_Glossy_White_ps.glsl Regenerates the glossy-plastic baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Fusion/normalmap/Gold_ps.glsl Regenerates the normal-mapped gold baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Fusion/metal/Copper_Polished_vs.glsl Adds the polished-copper vertex baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Fusion/metal/Brass_Wire_Mesh_vs.glsl Adds the brass-mesh vertex baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Fusion/metal/Anodized_Red_Rough_vs.glsl Adds the anodized-red vertex baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Fusion/metal/Anodized_Blue_Glossy_vs.glsl Adds the anodized-blue vertex baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Fusion/metal/Aluminum_Diamond_Plate_vs.glsl Adds the diamond-plate vertex baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Fusion/metal/Aluminum_Cast_vs.glsl Adds the cast-aluminum vertex baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Fusion/layered/Paint_Metallic_Red_ps.glsl Regenerates the red metallic-paint baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Fusion/layered/Paint_Metallic_Green_ps.glsl Regenerates the green metallic-paint baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Fusion/heightmap/Gold_pass_ps.glsl Regenerates the height-mapped gold baseline.
contrib/tests/metashade_ref/renders/standard_surface/adsk/Examples/Fusion/glazing/Glazing_test_ps.glsl Regenerates the Fusion glazing baseline.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@ppenenko
ppenenko merged commit 1292273 into metashade/dev Aug 25, 2026
37 checks passed
@ppenenko
ppenenko deleted the metashade/inline-rotate-helper branch August 25, 2026 21:22
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