Phase 0: Repository-Initialisierung nach Bauplan v1.2
- Struktur gemäß §8 (Eigentumsgrenzen), PLAN.md als normative Basis - Pflichtdokumente: STATUS.md, ERRORS.md, TEST_REPORT.md, CHANGELOG.md, ADRs - ADR-0001 Python 3.13-Pin, ADR-0002 GStreamer 1.28.6-Pin (Windows), ADR-0003 IPC TCP+MessagePack v1 - Kernpakete: hms_protocol, hms_domain, hms_parameter, hms_artnet, hms_adaptive, hms_capabilities, hms_plugin_sdk - Renderer-Spike: D3D11-Primärpfad + Dev-GL-Pfad (§36 Nr. 4-5) - Control Core: FastAPI REST + WebSocket (§36 Nr. 9) - Beispielplugins: Passthrough + Gaussian Blur (3 Adaptive-Quality- Varianten, HLSL/GLSL/GLES) - Tools: Art-Net-Emulator, Fixture-Generator (Master32/Layer64-CSV), Capability-Probe - JSON-Schemas: IPC, Plugin, Projekt, Cluster - 121 Unit-/Integrationstests grün, Ruff grün Gate 0 bleibt offen: Hardwaremessungen nur auf echter Windows-Referenz- hardware gültig (§29.7, §33).
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
# Example Passthrough (SDK-Referenz)
|
||||
|
||||
Erstes Beispielplugin gemäß PLAN.md §14 und §36 Nr. 6: HLSL-Passthrough mit einem live änderbaren Parameter `mix` sowie semantisch gleiche GLSL- und GLES-Testvarianten.
|
||||
|
||||
- `shaders/d3d11/passthrough.hlsl` – Windows-Primärpfad (D3D11, PS_5_0)
|
||||
- `shaders/gl/passthrough.frag` – Linux x64 (GLSL 330)
|
||||
- `shaders/gles/passthrough.frag` – Raspberry Pi / GLES (100)
|
||||
|
||||
Alle Varianten verwenden dieselben semantischen Standard-Inputs (§14.4).
|
||||
Das Plugin validiert fehlerfrei gegen `hms_plugin_sdk` (Validator-Test in `tests/unit/test_plugin_manifest.py`).
|
||||
|
||||
Shader-Kompilierung und Bildgleichheit werden auf Zielsystemen geprüft
|
||||
(Gate-0-Hardwaremessung, §29.3); dieser Container besitzt keine GPU.
|
||||
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"schema_version": 1,
|
||||
"id": "com.hms.fx.example_passthrough",
|
||||
"name": "Example Passthrough",
|
||||
"version": "1.0.0",
|
||||
"api_version": 1,
|
||||
"kind": "filter",
|
||||
"vendor": "HMS",
|
||||
"entrypoints": {
|
||||
"d3d11": {
|
||||
"type": "hlsl_singlepass",
|
||||
"passes": [
|
||||
{"pixel_shader": "shaders/d3d11/passthrough.hlsl"}
|
||||
]
|
||||
},
|
||||
"gl": {
|
||||
"type": "glsl_singlepass",
|
||||
"passes": [
|
||||
{"fragment": "shaders/gl/passthrough.frag"}
|
||||
]
|
||||
},
|
||||
"gles": {
|
||||
"type": "glsl_es_singlepass",
|
||||
"passes": [
|
||||
{"fragment": "shaders/gles/passthrough.frag"}
|
||||
]
|
||||
}
|
||||
},
|
||||
"capabilities": {
|
||||
"minimum_tier": "PI_LITE",
|
||||
"requires_input_texture": true,
|
||||
"supported_backends": ["d3d11", "gl", "gles"]
|
||||
},
|
||||
"adaptive_quality": {
|
||||
"default": "auto",
|
||||
"variants": [
|
||||
{"id": "low", "internal_scale": 1.0, "samples": 1},
|
||||
{"id": "medium", "internal_scale": 1.0, "samples": 1},
|
||||
{"id": "high", "internal_scale": 1.0, "samples": 1}
|
||||
],
|
||||
"transition_ms": 180,
|
||||
"semantic_parameters_unchanged": ["mix"]
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"id": "mix",
|
||||
"label": "Mix",
|
||||
"type": "float",
|
||||
"minimum": 0.0,
|
||||
"maximum": 1.0,
|
||||
"default": 0.0,
|
||||
"dmx_slots": [1],
|
||||
"curve": "linear"
|
||||
}
|
||||
],
|
||||
"failure_mode": "bypass"
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
// HMS MediaEngine – Beispielplugin: Passthrough mit Live-Parameter "mix"
|
||||
// PLAN.md §14.4 (Standard-Shaderinputs), §36 Nr. 6
|
||||
// D3D11-Pixelshader (PS_5_0); Bindung übernimmt der Backend-Adapter (ADR-0004 offen).
|
||||
// Projekte referenzieren niemals konkrete Backend-Variablennamen (§12.6).
|
||||
|
||||
Texture2D u_input_texture : register(t0);
|
||||
SamplerState u_sampler : register(s0);
|
||||
|
||||
cbuffer hms_params : register(b0)
|
||||
{
|
||||
float4 u_resolution; // xy = Auflösung in Pixeln
|
||||
float u_time_seconds;
|
||||
float u_delta_seconds;
|
||||
float u_frame_index;
|
||||
float u_layer_opacity;
|
||||
float u_audio_rms;
|
||||
float u_audio_peak;
|
||||
float u_audio_bass;
|
||||
float u_audio_mid;
|
||||
float u_audio_treble;
|
||||
float u_audio_beat;
|
||||
float param_mix; // Plugin-Parameter, live änderbar (0..1)
|
||||
float _pad0; // 16-Byte-Alignment des cbuffer
|
||||
};
|
||||
|
||||
float4 mainPS(float4 pos : SV_POSITION, float2 uv : TEXCOORD0) : SV_Target
|
||||
{
|
||||
float4 src = u_input_texture.Sample(u_sampler, uv);
|
||||
|
||||
// Live-Parameter: mix blendet zwischen Original und zeitmodulierter Helligkeit
|
||||
float pulse = 0.5 + 0.5 * sin(u_time_seconds * 2.0);
|
||||
float m = saturate(param_mix);
|
||||
float3 rgb = src.rgb * lerp(1.0, pulse, m);
|
||||
float a = src.a * u_layer_opacity;
|
||||
|
||||
return float4(rgb * u_layer_opacity, a);
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
#version 330 core
|
||||
// HMS MediaEngine – Beispielplugin: Passthrough mit Live-Parameter "mix"
|
||||
// GLSL-Testvariante, semantisch identisch zur HLSL-Implementierung (§36 Nr. 6).
|
||||
// Standard-Inputs gemäß PLAN.md §14.4; Bindung über den GL-Backend-Adapter.
|
||||
|
||||
uniform sampler2D u_input_texture;
|
||||
uniform vec2 u_resolution;
|
||||
uniform float u_time_seconds;
|
||||
uniform float u_delta_seconds;
|
||||
uniform float u_frame_index;
|
||||
uniform float u_layer_opacity;
|
||||
uniform float u_audio_rms;
|
||||
uniform float u_audio_peak;
|
||||
uniform float u_audio_bass;
|
||||
uniform float u_audio_mid;
|
||||
uniform float u_audio_treble;
|
||||
uniform float u_audio_beat;
|
||||
uniform float param_mix;
|
||||
|
||||
in vec2 v_uv;
|
||||
out vec4 fragColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 src = texture(u_input_texture, v_uv);
|
||||
|
||||
float pulse = 0.5 + 0.5 * sin(u_time_seconds * 2.0);
|
||||
float m = clamp(param_mix, 0.0, 1.0);
|
||||
vec3 rgb = src.rgb * mix(1.0, pulse, m);
|
||||
float a = src.a * u_layer_opacity;
|
||||
|
||||
fragColor = vec4(rgb * u_layer_opacity, a);
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
#version 100
|
||||
// HMS MediaEngine – Beispielplugin: Passthrough (OpenGL ES, Raspberry Pi Pfad)
|
||||
// Semantisch identisch zu HLSL/GLSL-Varianten (§36 Nr. 6, §12.6).
|
||||
precision mediump float;
|
||||
|
||||
uniform sampler2D u_input_texture;
|
||||
uniform vec2 u_resolution;
|
||||
uniform float u_time_seconds;
|
||||
uniform float u_delta_seconds;
|
||||
uniform float u_frame_index;
|
||||
uniform float u_layer_opacity;
|
||||
uniform float u_audio_rms;
|
||||
uniform float u_audio_peak;
|
||||
uniform float u_audio_bass;
|
||||
uniform float u_audio_mid;
|
||||
uniform float u_audio_treble;
|
||||
uniform float u_audio_beat;
|
||||
uniform float param_mix;
|
||||
|
||||
varying vec2 v_uv;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 src = texture2D(u_input_texture, v_uv);
|
||||
|
||||
float pulse = 0.5 + 0.5 * sin(u_time_seconds * 2.0);
|
||||
float m = clamp(param_mix, 0.0, 1.0);
|
||||
vec3 rgb = src.rgb * mix(1.0, pulse, m);
|
||||
float a = src.a * u_layer_opacity;
|
||||
|
||||
gl_FragColor = vec4(rgb * u_layer_opacity, a);
|
||||
}
|
||||
Reference in New Issue
Block a user