Phase 3: Alle 24 Pflicht-Plugins (10 Generatoren + 14 Filter, §15.1/§15.2)
- 10 Generatoren mit Manifest + HLSL + GLSL + GLES je Plugin: solid, gradient, checker_grid, stripes_chaser, noise_clouds (AQ Octaves 2/3/5), plasma, wave_bars, shapes, drops_ripples, starfield (AQ 32/128/512 Partikel) - 14 Filter mit Manifest + Shader je Backend: transform2d (keine AQ-Geometriereduktion), color_adjust, gradient_map, blur_sharpen (separabel 2-Pass, AQ 5/9/17 Samples), pixelate_quantize, mirror_tile, kaleidoscope, wave_displace (Noise adaptiv, Amount unverändert), rgb_split, glow_bloom (Kaskade 2/4/8), edge_emboss, vignette, strobe_pulse (Safety clamp 2 Hz, nie durch DMX allein freischaltbar), feedback_trails (Double-Buffer, Clear-Trigger, §15.3) - Uniform-Vertrag §14.4 in allen 75 Shadern; Generatoren sampeln nie u_input_texture; alle Filter mit mix-0-Bypass (§15.3) - 195 parametrisierte Plugin-Tests: Manifest/Backends/DMX-Slots<=8/ AQ>=3 Varianten/Uniform-Satz/Vollstaendigkeit exakt 10+14 - Nachtraegliche Manifest-Fixes: AQ-Bloecke fuer 4 1-Pass-Filter, mix-Parameter fuer feedback_trails (Slot-Overlap vermieden) - Gesamtsuite 506 gruen, Ruff gruen
This commit is contained in:
@@ -0,0 +1,64 @@
|
||||
// Wave Bars Generator
|
||||
// HMS MediaEngine – Generator (kein Eingangstextur-Bezug, cbuffer identisch §14.4)
|
||||
// D3D11-Pixelshader (PS_5_0). Semantik identisch zu GL/GLES (§12.6, §15.1).
|
||||
|
||||
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;
|
||||
float4 param_color_a;
|
||||
float4 param_color_b;
|
||||
float param_waveform;
|
||||
float param_count;
|
||||
float param_amplitude;
|
||||
float param_frequency;
|
||||
float param_angle;
|
||||
float param_phase;
|
||||
float param_speed;
|
||||
float u_quality_samples; // AQ-Variante (Backend-Bindung)
|
||||
float _pad0; // 16-Byte-Alignment
|
||||
float _pad1; // 16-Byte-Alignment
|
||||
};
|
||||
|
||||
float hash21(float2 p)
|
||||
{
|
||||
p = frac(p * float2(123.34, 456.21));
|
||||
p += dot(p, p + 45.32);
|
||||
return frac(p.x * p.y);
|
||||
}
|
||||
|
||||
float4 mainPS(float4 pos : SV_POSITION, float2 uv : TEXCOORD0) : SV_Target
|
||||
{
|
||||
float2 p = uv - 0.5;
|
||||
float ca = cos(param_angle);
|
||||
float sa = sin(param_angle);
|
||||
p = float2(ca * p.x - sa * p.y, sa * p.x + ca * p.y);
|
||||
float t = u_time_seconds * param_speed + param_phase;
|
||||
float n = clamp(param_count, 1.0, 64.0);
|
||||
float cell = 1.0 / n;
|
||||
float fx = frac(p.x / cell);
|
||||
float wave;
|
||||
float wf = floor(param_waveform + 0.5);
|
||||
if (wf < 0.5) { wave = sin(fx * 6.2831853 * param_frequency + t); }
|
||||
else if (wf < 1.5) { wave = 4.0 * abs(fx - 0.5) - 1.0; }
|
||||
else if (wf < 2.5) { wave = 2.0 * fx - 1.0; }
|
||||
else { wave = (fx < 0.5) ? 1.0 : -1.0; }
|
||||
float h = 0.5 + wave * param_amplitude * 0.5;
|
||||
float aa = 0.02 / clamp(u_quality_samples, 1.0, 32.0);
|
||||
float bar = 1.0 - smoothstep(h * 0.5 - aa, h * 0.5 + aa, abs(p.y));
|
||||
float colIdx = floor(p.x / cell) / max(n - 1.0, 1.0);
|
||||
float3 col = lerp(param_color_a.rgb, param_color_b.rgb, colIdx);
|
||||
return float4(col * bar * u_layer_opacity, bar * u_layer_opacity);
|
||||
}
|
||||
Reference in New Issue
Block a user