Add mouse-trail mod - #5442
Conversation
…ion, shape trail, particle optimizations
…) and Motion Blur (history frame overlay)
…very, display change handling, idle backoff, .gitattributes for binary assets
…st (not in upstream Windhawk), add upper bounds for tail_length/click_max_radius/click_duration
…ion reset, cursor color extraction excludes overlay, cached system metrics, refreshed game detection handles, code cleanup
…c cross-thread, hidden window init, vsync sync with DwmFlush, honest derivative credit in PR
…skip click effects in game, clear motion blur history on device loss
…remove SWP_SHOWWINDOW on display change, add WARP fallback in device recovery
…pe changes from tapered
…, 18 color modes, 10 trail shapes, 2.5D depth effects, optimized cursor color shift (6 modes), Bezier smoothing, motion blur
|
Thanks for the pull request! This repository uses a two-stage review: an AI review that you run yourself, followed by a human review. To get started, comment See the pull request review process for the full details. |
|
/ready-for-reviewer |
|
@MCheng404 See the pull request review process for details. |
|
/ai-review |
Submission reviewNote: This review was done by Claude. Due to the amount of submissions, doing a fully manual review for each pull request is no longer feasible. Thank you for understanding. Remember: The AI reviewer can be wrong - it may misread code, flag correct code as broken, or suggest changes that make things worse. Treat its findings as suggestions to verify, not instructions to follow blindly. You're responsible for the code you submit, so if a finding doesn't hold up, say so instead of changing working code to satisfy it. Please address the following issues. The items in the collapsed sections are optional, so it's your call whether to address them. The headline feature of v3 — the native D3D11/HLSL renderer — never executes: the shaders fail to compile at startup, so every frame silently falls back to the D2D1 path. That makes most of the ~700 lines added in v3.0–v3.3 dead code, and it hides several further bugs in that code. Please decide which renderer is canonical and re-test end to end before the next round. 1. The native D3D11 renderer never runs — shader entry-point mismatch. static bool CompileShader(const char* source, const char* entry, const char* target, ID3DBlob** blob) {
...
HRESULT hr = D3DCompile(source, strlen(source), nullptr, nullptr, nullptr, entry, target, ...);
}
...
if (!CompileShader(g_vsShader, "VSMain", "vs_4_0", &vsBlob)) return false;
if (!CompileShader(g_psShader, "PSMain", "ps_4_0", &psBlob)) return false;Note that simply fixing this will regress visible behaviour, because Given that the native renderer has clearly never executed on any machine, the lowest-risk option is to delete it ( 2. The pixel shader's constant buffer is never bound. Every call site does 3. 4. The constant buffer is undersized and 5. 6. 7. Three of the ten advertised trail shapes do nothing. 8. Roughly 150 lines of never-called shape-rendering code. 9. 10. Substantial overlap with the existing Cursor Motion Blur mod. This isn't just a shared theme — the architecture is recognisably the same mod: same 11. The README has no screenshot or GIF. The demo GIFs added in Optional improvements
Minor polish — none of this affects users, so it's your call.
Functionality notes
Non-critical observations and ideas about the feature behavior itself.
Next steps:
See the review process for details. |
…fer, gradientCount type, lightDir offset, ripple origin, display affinity scoping
…er overflow guard
…er instead of origin
…ape rendering code, fix 2.5D perspective
|
/ai-review |
|
@MCheng404 |
- NativeRenderTrail: merge 7 layers into single Map (eliminate 6 extra Map/Unmap + vector allocations) - NativeRenderParticles: merge glow+normal layers into single Map, single particle traversal - NativeRenderTrailShapes: precompute shape vertices static cache (eliminate per-frame cos/sin/pow) - Trail PS: tube lighting edge brightness 0.75->0.88, edge softness via v coordinate - Particle PS: signed distance soft edges for all shapes, radial lighting min 0.45->0.6 - Particle opacity 0.65->0.80 - Adaptive contrast strength halved (0.7->0.35) - New settings: edge_softness, enable_particle_glow, particle_glow_intensity - Head highlight focused to trail head only - Fix: glow layer no longer switches to gray on bright backgrounds (was causing gradual dimming)
|
/ai-review |
Submission reviewNote: This review was done by Claude. Due to the amount of submissions, doing a fully manual review for each pull request is no longer feasible. Thank you for understanding. Remember: The AI reviewer can be wrong - it may misread code, flag correct code as broken, or suggest changes that make things worse. Treat its findings as suggestions to verify, not instructions to follow blindly. You're responsible for the code you submit, so if a finding doesn't hold up, say so instead of changing working code to satisfy it. Please address the following issues. The items in the collapsed sections are optional, so it's your call whether to address them. The tool-mod structure is right (dedicated 1. The 4096-vertex trail buffer silently drops the main trail band at higher
With Bezier smoothing on (default),
So anywhere above ~120 the actual trail disappears and the user is left with a faint halo, with nothing in the log to explain it. The non-Bezier path grows at the same rate (two 2x subdivision passes), so it hits the same wall.
Suggested fix: size the vertex buffer from the actual requirement instead of a magic 4096 — recreate it when 2. The "Feather" trail shape isn't implemented
3. Two complete renderers, one of which is unreachable and behaves differently
Worse, if it did execute the mod would silently behave differently: the D2D particle path only knows shape types 2 and 3 (line 3474-3487), ignores I'd drop the D2D path entirely: log and leave the overlay hidden if 4. Overlap with the existing This mod is a derivative of cursor-motion-blur — same The catalog problem is that with Optional improvements
Minor polish — none of this affects users, so it's your call.
Functionality notes
Non-critical observations and ideas about the feature behavior itself.
Next steps:
See the review process for details. |
|
/ready-for-reviewer |
Display optimization: - Additive blending for glow layers (trail/particles/ripples) - Particle fast-move interpolation (interval<=10ms, eliminates gaps) - Trigger/stop logic optimization (2-frame confirm, actual distance check) - Hard cut fadeout fix (clear all state to prevent residual rendering) - 5 new color modes: thermal heatmap, wave interference, spectrum split, grain dither, gradient warp - Gradient system rewrite: any number of colors (max 16), OKLab perceptual interpolation, precomputed 256-color LUT, flowing gradient Color mode algorithm optimization: - All 23 modes optimized with velocity response, multi-frequency dynamics, enhanced head-tail contrast - Bilingual code comments (Chinese/English) Centripetal vortex (entertainment feature): - Curvature-based detection (any curved motion triggers) - Physical orbital model: angular momentum conservation, Kepler velocity gradient, spiral convergence - 3D orbit tilt with z-depth association and front-back occlusion sorting - Particles fly out centrifugally when motion stops Particle physics mass system: - Random particle mass (affects size via cube root, lifetime, inertia/friction, acceleration a=F/m) - Newtonian gravity between particles: F=G*m1*m2/r^2, a=F/m - Binary star / N-body system modes (2-10 massive bodies) - All features with independent toggles
|
New commits were pushed, so this pull request left the human review queue and is back to waiting-for-author. Comment |
- Separate particle random color offset from vortex brightness modulation - Add vortexBrightness[3] field for centripetal/3D brightness effects - colorOffset now preserved as particle's permanent random color variation - Render: final color = base + colorOffset + vortexBrightness
|
/ai-review |
Submission reviewNote: This review was done by Claude. Due to the amount of submissions, doing a fully manual review for each pull request is no longer feasible. Thank you for understanding. Remember: The AI reviewer can be wrong - it may misread code, flag correct code as broken, or suggest changes that make things worse. Treat its findings as suggestions to verify, not instructions to follow blindly. You're responsible for the code you submit, so if a finding doesn't hold up, say so instead of changing working code to satisfy it. Please address the following issues. The items in the collapsed sections are optional, so it's your call whether to address them. The overall shape is right: a dedicated-process tool mod with no hooks into other processes, the wiki launcher boilerplate, clean setting/code mapping (all 76 settings are read, with matching types), no persistent system changes, and a README with GIFs on an allowed host. The items below are what stood out. 1. Screen-capture exclusion is never applied at startup. 2. Remove the two if (WaitForSingleObject(g_bgSampleThread, 3000) == WAIT_TIMEOUT) {
Wh_Log(L"RenderThread: background sampler thread timed out, leaking handle");
} else {
CloseHandle(g_bgSampleThread);
}
g_bgSampleThread = NULL;(and skip the 3. Unchecked GDI allocations in HBITMAP hBmp = CreateDIBSection(hdcScreen, &bmi, DIB_RGB_COLORS, &pBits, nullptr, 0);
HDC hdcMem = CreateCompatibleDC(hdcScreen);
if (!hBmp || !hdcMem || !pBits) {
if (hBmp) DeleteObject(hBmp);
if (hdcMem) DeleteDC(hdcMem);
ReleaseDC(NULL, hdcScreen);
return;
}4. The English README is a subset of the Chinese one. English is the catalogue default, but the English half documents 18 colour modes, no centripetal vortex and no particle mass/gravity system, while the Chinese half documents 23 modes and all of those features. The 5. The feature surface is very large, and parts of it don't currently work. 76 settings, 23 colour modes, 10 trail shapes, a runtime expression parser, a centripetal-vortex orbital model and an N-body Newtonian gravity simulator is a lot for a cursor trail, and three of the more exotic pieces are inert or broken in this build (see Functionality notes — the vortex's acceleration response is dead code, the double-ring click ripple never renders). Since the mod is AI-assisted, it's worth asking directly which of these you actually use and intend to maintain. The 6. Please state explicitly how this differs from Cursor Motion Blur. You credit its overlay architecture (thanks for that, and the MIT-to-MIT licensing is consistent), but the default configuration here — tapered ribbon with glow, triggered above a velocity threshold, drawn by a topmost DComp overlay in a Optional improvements
Minor polish — none of this affects users, so it's your call.
Functionality notes
Non-critical observations and ideas about the feature behavior itself.
Next steps:
See the review process for details. |
|
It's unclear whether the PR is ready. My best guess is that you commented |
|
/ready-for-reviewer Not much else to improve, the code is pretty much perfect... except for this one bug I'm not sure how to fix. When users update their graphics drivers, the renderer stops working properly and they have to disable and re-enable the mod to recover. Shouldn't be a big deal though—it's not like people update their drivers every day, right? |
A highly customizable mouse cursor trail with particle effects, multiple color modes, custom function trails, cursor color extraction, click effects, centripetal vortex, and particle physics system. Built on native D3D11 + HLSL + DirectComposition hardware acceleration, runs as a dedicated process with low CPU usage when idle.
Version: v3.3.1
Demo
Tapered Ribbon Trail
Shape Trail (Hearts / Stars / Hexagrams / Circles)
Particle Effects
Click Effects (Starburst + Ripple)
Combined Effects (Gradient + Particles + Glow)
Visual Effects
v3.3.1 Changelog
Display Optimization
Centripetal Vortex (Entertainment Feature)
Particle Physics Mass System
Rendering Architecture
WM_DISPLAYCHANGEPerformance
Present(1, 0)+DwmFlush()for consistent frame timing across refresh ratesCredits
Developed by MCheng404. Inspired by and based on the core overlay/smear architecture of Cursor Motion Blur by TheatriChris (MIT License).
Mod authorship
This mod was created by: