You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Win2D NuGet package (Microsoft.Graphics.Win2D 1.3.0) and all
related pch.h includes have been dragged along since Day 1 but no
source file in the repo actually uses any Microsoft::Graphics::Canvas
symbol. Every effect is implemented directly against D2D/D3D11 for
the contract control the custom-effect path needs. Stripping it:
pch.h
Removes four Win2D headers (Canvas.h, Canvas.Effects.h,
Canvas.UI.Xaml.h, Microsoft.Graphics.Canvas.native.h).
packages.config
Removes the Microsoft.Graphics.Win2D 1.3.0 entry.
ShaderLab.vcxproj
Removes the Win2D .props/.targets imports + the existence-check
error target.
README.md
Drops "Direct2D and Win2D shader effects" -> "Direct2D shader
effects" in the tagline. Drops "Win2D 1.3.0" from the prereq list.
.github/copilot-instructions.md
Drops Win2D from the pch.h aggregate description + the required-
SDKs list.
docs/development/project-structure.md
Drops Win2D from the pch.h header comment.
docs/history/decision-log.md
Annotates decision #7 ("Win2D interop via native headers") as
reversed Day 13 with a brief rationale.
Verified: clean rebuild, RunHeadlessSmoke.ps1 passes (ratio 2.500),
ShaderLabTests 183/183 pass.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,15 +8,15 @@ ShaderLab is a WinUI 3 desktop application (C++/WinRT) for developing, testing,
8
8
9
9
-**C++/WinRT only** — never generate C# code. Direct COM access to `ID2D1EffectImpl`, `ID2D1DrawTransform`, `ID2D1ComputeTransform` is the reason this project exists.
10
10
-**`docs/` is the living architecture documentation tree.** Update the relevant file under `docs/architecture/`, `docs/effects/`, etc. when a significant architectural change lands. Append a new entry to [`docs/history/decision-log.md`](../docs/history/decision-log.md) with a Mermaid diagram for any choice that future contributors will need to understand the *why* of. The repo-root `README.md` is intentionally slim — install + build + a pointer to `docs/` — and should not be expanded with technical detail.
11
-
-**All new `.cpp` files must `#include "pch.h"` as the first include** — precompiled header is mandatory (`pch.h` aggregates WinRT, D2D, D3D, Win2D, DXGI, WIC, and STL headers).
11
+
-**All new `.cpp` files must `#include "pch.h"` as the first include** — precompiled header is mandatory (`pch.h` aggregates WinRT, D2D, D3D, DXGI, WIC, and STL headers).
12
12
13
13
## Build
14
14
15
15
- Open `ShaderLab.slnx` in Visual Studio 2022 17.8+
16
16
- NuGet packages restore automatically (packages.config style, not PackageReference)
-`/bigobj` is enabled; language standard is C++20 (VS 18+) or C++17 (VS 17)
22
22
@@ -134,7 +134,7 @@ Active development centers on **tone-mapping and color-correction effects author
134
134
-**Effect registry**: Singleton with 40+ built-in D2D effects across 9 categories. Case-insensitive name lookup.
135
135
-**ShaderLab effects library**: 33 built-in effects in `Effects/ShaderLabEffects.h/.cpp` across categories: Analysis (Heatmaps + Scopes + Statistics + Tone-Mapping), Color Processing (Gamut Map + ICtCp Gamut Map + Scale), Source / Generator, Composition (Split Comparison), and the data-only Parameter / Clock / Numeric Expression / Random / Working Space nodes. Embedded HLSL with shared color math from `Effects/ColorMath.cpp`. Auto-compiled at first use; bytecode cached on disk under `%LOCALAPPDATA%\ShaderLab\bytecode\` (decision #58 catalog → see [builtin-catalog.md](../docs/effects/builtin-catalog.md) for the full per-effect type table).
136
136
-**MCP server**: JSON-RPC 2.0 server on port 47808 (47809 for headless to avoid shared-machine conflicts). The server itself + 20 engine-pure routes live in `Engine/Mcp/{McpHttpServer,EngineMcpRoutes}.{h,cpp}`; 16 UI-coupled / host-specific routes stay in `MainWindow.McpRoutes.cpp`. Both hosts register the same engine-side route set through the same `IEngineCommandSink` interface (decision #58). Engine-side routes are uniform: pure mutation closures dispatched via `sink.Dispatch`, with 8 event hooks (`OnNodeAdded`, `OnNodeRemoved`, `OnNodeChanged`, `OnGraphCleared`, `OnGraphLoaded`, `OnGraphStructureChanged`, `OnCustomEffectRecompiled`, `OnDisplayProfileChanged`) the GUI overrides to keep its UI in sync.
137
-
-**Versioning**: `Version.h` defines app version (currently **1.7.1**) and graph format version (2). Both are stored in saved graphs. Forward compatibility check on load. `EngineExport.h::SHADERLAB_ENGINE_ABI_VERSION` is independent — bumped manually on engine ABI breaks; mismatch between header and DLL aborts startup with a friendly message-box.
137
+
-**Versioning**: `Version.h` defines app version (currently **1.7.2**) and graph format version (2). Both are stored in saved graphs. Forward compatibility check on load. `EngineExport.h::SHADERLAB_ENGINE_ABI_VERSION` is independent — bumped manually on engine ABI breaks; mismatch between header and DLL aborts startup with a friendly message-box.
138
138
-**Refresh-rate-driven render loop on the worker thread**: the render worker `std::jthread` runs the graph evaluate at the active monitor's refresh rate (clamped to 60–240 Hz). Dirty-gated: skips evaluate when no nodes changed, no output window is open, and `m_forceRender` is false. The UI thread runs a `DispatcherQueueTimer` at the same rate, but its body is just "drain dispatcher + blit offscreen + Present1" — sub-ms cost. The interval is re-applied on every display change so dragging the window across monitors picks up the new rate.
139
139
-**`ProcessDeferredCompute` requires an active D2D draw session**: it calls `dc->DrawImage` internally to pre-render the upstream chain into an FP32 bitmap, and outside `BeginDraw`/`EndDraw` that DrawImage silently no-ops. The GUI's `RenderFrame`, the headless host's `runEval` / `RunRender`, and the test bench all wrap accordingly.
140
140
-**Ctrl+Enter** compiles shader from the editor TextBox.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,12 @@ Format follows [Keep a Changelog](https://keepachangelog.com/).
5
5
6
6
## [Unreleased]
7
7
8
+
## [1.7.2] - 2026-05-10
9
+
10
+
### Removed
11
+
12
+
-**Win2D dependency dropped.** The `Microsoft.Graphics.Win2D` 1.3.0 NuGet package, the four `pch.h` includes (`winrt/Microsoft.Graphics.Canvas.h`, `.Effects.h`, `.UI.Xaml.h`, `Microsoft.Graphics.Canvas.native.h`), and the vcxproj `.props`/`.targets` imports are all removed. No source file in the repo had used a `Microsoft::Graphics::Canvas::*` symbol — every effect is implemented directly against D2D/D3D11 for the contract control the custom-effect path needs. Decision #7 from Day 1 ("Win2D interop via native headers") is marked reversed in the decision log. README + copilot-instructions + project-structure docs updated to drop the Win2D mention.
A WinUI 3 desktop application (C++/WinRT) for developing, testing, and debugging Direct2D and Win2D shader effects with full HDR and wide color gamut support.
5
+
A WinUI 3 desktop application (C++/WinRT) for developing, testing, and debugging Direct2D shader effects with full HDR and wide color gamut support.
6
6
7
7
---
8
8
@@ -76,7 +76,7 @@ Core capabilities:
76
76
-**HDR / WCG aware** — DXGI adapter-change tracking, ICC profile parsing, monitor primaries piped into Custom-gamut analysis effects via the Working Space node.
77
77
-**MCP server** + **headless host** for AI-agent and CI integration; the MCP route layer lives in `ShaderLabEngine.dll` so headless and GUI hosts share the route implementations.
78
78
79
-
Build: Visual Studio 2022 17.8+, Windows 10 SDK 10.0.26100+, Win2D 1.3.0, C++/WinRT only (no C#).
79
+
Build: Visual Studio 2022 17.8+, Windows 10 SDK 10.0.26100+, C++/WinRT only (no C#).
Copy file name to clipboardExpand all lines: docs/history/decision-log.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@
8
8
| 4 | Configurable PipelineFormat (not hardwired) | Users need sRGB for SDR debugging, HDR10 for PQ content, FP32 for precision work. Format affects swap chain, RTs, tone mapper, inspector. | Day 1 |
9
9
| 5 | Node-based DAG graph editor as primary UI | Visual effect chaining matches D2D effect graph model naturally. Enables per-node preview and pixel inspection. | Day 1 |
10
10
| 6 | Live HLSL editing with D3DCompile hot-reload | Core value prop: edit shader code, see results immediately. D3DReflect discovers constant buffers for auto-generated UI. | Day 1 |
11
-
| 7 | Win2D interop via native headers | Use Win2D's built-in effect wrappers where convenient, fall back to raw D2D for custom effects. Native interop via GetWrappedResource/CreateDrawingSession. | Day 1 |
11
+
| 7 | Win2D interop via native headers | Use Win2D's built-in effect wrappers where convenient, fall back to raw D2D for custom effects. Native interop via GetWrappedResource/CreateDrawingSession. **Reversed (Day 13):** the Win2D wrappers were never adopted in practice — every effect ended up implemented directly against D2D for the precise contract control the custom-effect work demands. Win2D NuGet + pch.h includes + `Microsoft.Graphics.Canvas.native.h` interop header all dropped in v1.7.2; no source file used a `Microsoft::Graphics::Canvas::` symbol at the time. | Day 1 (reversed Day 13)|
12
12
| 8 | MSIX packaged desktop app | Required for WinUI 3 full functionality, AppContainer=false for full trust (DirectX device access). | Day 1 |
13
13
| 9 | Clean project at E:\source\ShaderLab | Avoid MSIX/manifest conflicts from nesting inside existing workspace. Fresh project with all NuGet wiring from scratch. | Day 1 |
14
14
| 10 | Kahn's algorithm for topological sort | Linear-time O(V+E), naturally detects cycles (sorted count ≠ node count), simple queue-based — no recursion. | Day 2 |
0 commit comments