Introduction¶
The design philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” For developers or long-term users, a pure white conversation interface may appear monotonous. The dsh-motion-background plugin addresses the visual monotony of the interface by introducing dynamic backgrounds. This plugin replaces the background color of the conversation interface with real-time rendered visuals or media assets.
Core Features¶
The plugin provides two types of dynamic background solutions:
- Shader-based (GLSL): Utilizes WebGL2 for per-frame real-time rendering, with visuals generated by code.
- Media-based: Uses media files such as MP4, WebM, GIF, or images as backgrounds. It does not depend on WebGL2 and can run in environments without WebGL2 support.
The plugin core contains no third-party shader code and detects such code via full-word matching of function names. Additionally, the plugin supports video ping-pong playback to avoid visible jumps at loop seams, and dynamically adjusts frame rate based on window state (30fps in foreground, 15fps when unfocused, 0fps in background) to optimize performance.
Installation and Activation¶
The plugin is mounted as a folder and does not require command-line installation.
- Create a folder in the DSH plugin directory.
- Place
mod.jsonandfragment.glsl(required only for shader-based effects) inside the folder. - Refresh the DSH page. The plugin will automatically scan and load the new effects without requiring a restart.
Effect Extension Points¶
Shader-based¶
Shader-based effects are implemented through GLSL code. The GLSL version and output variable must be declared in fragment.glsl:
#version 300 es
out vec4 fragColor;
void main() {
// Your code
}
The shader must implement its own hash random number generator and must not declare any samplers.
In mod.json:
* The colors field must be "front" or "array"; otherwise, the effect will not be available.
* The types of uniforms used in fragment.glsl must be consistent with the core contract.
Media-based¶
Media-based effects are implemented by declaring a media field.
In mod.json:
* The media field must be declared.
* media.src can only be a filename within the effect’s own directory and must not contain path separators or ...
* Supported media extensions include mp4, webm, gif, webp, png, and jpg.
Resource Usage and Notes¶
- Frame Rate Limiting: To prevent excessive GPU usage, the core enforces frame rate limits. The upper limit is 30fps when running in the foreground, drops to 15fps when the window is unfocused, and rendering stops entirely (0fps) when the tab is hidden.
- Ping-Pong Playback: The HTML specification does not support
video playbackRate = -1; ping-pong playback (reverse playback) must be driven frame-by-frame by script. In ping-pong playback mode,loopmust be set tofalse, otherwise theendedevent will not fire. - No Guessing Principle: The core does not provide default values. Uniforms not declared in
mod.jsonwill not be automatically created.
License and Links¶
- License: MIT
- Repository: dsh-motion-background