0922cc1d68
- 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).
51 lines
1.4 KiB
HLSL
51 lines
1.4 KiB
HLSL
// HMS MediaEngine – Gaussian Blur, vertikaler Pass (separable)
|
||
// Identisch zu horizontal.hlsl mit texel = (0, 1).
|
||
|
||
Texture2D u_input_texture : register(t0);
|
||
SamplerState u_sampler : register(s0);
|
||
|
||
cbuffer hms_params : register(b0)
|
||
{
|
||
float4 u_resolution;
|
||
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_radius;
|
||
float u_quality_samples;
|
||
float _pad0;
|
||
float _pad1;
|
||
};
|
||
|
||
float4 mainPS(float4 pos : SV_POSITION, float2 uv : TEXCOORD0) : SV_Target
|
||
{
|
||
float radius = max(param_radius, 0.0);
|
||
float4 src = u_input_texture.Sample(u_sampler, uv);
|
||
if (radius < 0.01)
|
||
{
|
||
return src;
|
||
}
|
||
|
||
float samples = clamp(u_quality_samples, 1.0, 17.0);
|
||
float stepSize = radius / max(samples - 1.0, 1.0);
|
||
float2 texel = float2(0.0, 1.0) / u_resolution.xy;
|
||
|
||
float4 acc = float4(0.0, 0.0, 0.0, 0.0);
|
||
float total = 0.0;
|
||
[loop]
|
||
for (float i = 0.0; i < samples; i += 1.0)
|
||
{
|
||
float t = i - (samples - 1.0) * 0.5;
|
||
float w = exp(-(t * t) / (samples * 0.5));
|
||
acc += u_input_texture.Sample(u_sampler, uv + texel * (t * stepSize)) * w;
|
||
total += w;
|
||
}
|
||
return acc / total;
|
||
}
|