Skip to content

Shaders: Slice D — CLI/MCP parity, packaging, docs, tests #747

@fernandotonon

Description

@fernandotonon

Part of #743 (Epic: Shaders). Final slice — parity, packaging, docs, tests. Mirrors the roadmap "Slice X — CLI/MCP parity, docs, tests" convention.

CLI / MCP parity

  • CLI: presets flow through cmdMaterial --preset/--list-presets automatically. If a stylized tunable is worth CLI exposure (e.g. --toon-bands, --outline-width), thread it through cmdMaterialapplyStylizedPreset. Keep minimal; most users take defaults.
  • MCP: confirm the material-preset tool lists the new names; add optional tunable params mirroring CLI; breadcrumb "ai.tool_call".
  • CLI --preset "Toon + Outline" and the MCP tool produce the same material as the GUI.

Packaging (real risk — audit every path)

New shader/material/texture assets must ship in every package or the preset works in dev but ships broken:

  • cfg/resources.cfg.in registers the new programs dir (if added).
  • macOS .app bundle copy step includes the new media/ files.
  • .deb packaging includes them.
  • Windows install includes them.
  • Docker image includes them.
  • Packaging smoke test: run from a packaged build (not the dev tree) and apply a stylized preset.

Tests

  • Extend src/MaterialPresetLibrary_test.cpp: each stylized preset applies, creates expected passes/programs, undo restores, reapply idempotent.
  • Plus the Slice-A compile harness (src/StylizedShaders_test.cpp).
  • Wire any new _test.cpp into the test target in CMakeLists.txt.

Docs

  • CLAUDE.md — add stylized preset names to the examples; add a "Stylized Shaders" architecture note next to MaterialPresetLibrary (GLSL-via-.program, the 2-pass outline, and that custom SRS was deliberately avoided).
  • README / website CLI reference — update if it enumerates preset names.
  • action.yml — only if the preset surface changes the documented command/options (per CLAUDE.md rule).

Acceptance

  • All new tests pass on Linux CI; skip gracefully where Ogre is unavailable.
  • Stylized presets resolve from a packaged build on all three platforms.
  • Docs updated and discoverable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions