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,74 @@
|
||||
// Starfield 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_count;
|
||||
float param_size;
|
||||
float param_speed;
|
||||
float param_direction_x;
|
||||
float param_direction_y;
|
||||
float param_depth;
|
||||
float param_twinkle;
|
||||
float param_seed;
|
||||
float u_quality_samples; // AQ-Variante (Backend-Bindung)
|
||||
float _pad0; // 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;
|
||||
float t = u_time_seconds * param_speed;
|
||||
float maxN = clamp(u_quality_samples, 1.0, 512.0);
|
||||
float dl = length(float2(param_direction_x, param_direction_y));
|
||||
float2 dir = dl > 1e-4 ? float2(param_direction_x, param_direction_y) / dl : float2(0.0, -1.0);
|
||||
float acc = 0.0;
|
||||
float colAcc = 0.0;
|
||||
[loop]
|
||||
for (int i = 0; i < 512; i++)
|
||||
{
|
||||
if (float(i) >= maxN) { break; }
|
||||
float2 base = float2(hash21(float2(float(i) + param_seed, 1.0)), hash21(float2(float(i) + param_seed, 2.0)));
|
||||
float depth = hash21(float2(float(i) + param_seed, 3.0)) * param_depth;
|
||||
float2 pos = base + dir * t * (0.1 + depth * 0.9);
|
||||
pos = frac(pos);
|
||||
float2 d = pos - p;
|
||||
d = abs(d);
|
||||
d = min(d, 1.0 - d);
|
||||
float dist = length(d);
|
||||
float s = param_size * (0.3 + depth);
|
||||
float star = exp(-dist * dist / max(s * s, 1e-5));
|
||||
float tw = 0.5 + 0.5 * sin(t * 3.0 + param_seed * 10.0 + float(i) * 1.7);
|
||||
star *= lerp(1.0, tw, param_twinkle);
|
||||
acc += star;
|
||||
colAcc += star * depth;
|
||||
}
|
||||
acc = saturate(acc);
|
||||
float mixT = maxN > 1.0 ? colAcc / max(acc, 1e-5) : 0.0;
|
||||
float3 col = lerp(param_color_a.rgb, param_color_b.rgb, mixT);
|
||||
return float4(col * acc * u_layer_opacity, acc * u_layer_opacity);
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
// Starfield Generator
|
||||
// HMS MediaEngine – Generator (GLSL, Linux x64). Semantik identisch zu HLSL/GLES (§12.6, §15.1).
|
||||
#version 330 core
|
||||
|
||||
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 float4 param_color_a;
|
||||
uniform float4 param_color_b;
|
||||
uniform float param_count;
|
||||
uniform float param_size;
|
||||
uniform float param_speed;
|
||||
uniform float param_direction_x;
|
||||
uniform float param_direction_y;
|
||||
uniform float param_depth;
|
||||
uniform float param_twinkle;
|
||||
uniform float param_seed;
|
||||
uniform float u_quality_samples;
|
||||
|
||||
in vec2 v_uv;
|
||||
out vec4 fragColor;
|
||||
|
||||
float hash21(vec2 p)
|
||||
{
|
||||
p = fract(p * vec2(123.34, 456.21));
|
||||
p += dot(p, p + 45.32);
|
||||
return fract(p.x * p.y);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 p = v_uv;
|
||||
float t = u_time_seconds * param_speed;
|
||||
float maxN = clamp(u_quality_samples, 1.0, 512.0);
|
||||
float dl = length(vec2(param_direction_x, param_direction_y));
|
||||
vec2 dir = dl > 1e-4 ? vec2(param_direction_x, param_direction_y) / dl : vec2(0.0, -1.0);
|
||||
float acc = 0.0;
|
||||
float colAcc = 0.0;
|
||||
for (int i = 0; i < 512; i++)
|
||||
{
|
||||
if (float(i) >= maxN) { break; }
|
||||
vec2 base = vec2(hash21(vec2(float(i) + param_seed, 1.0)), hash21(vec2(float(i) + param_seed, 2.0)));
|
||||
float depth = hash21(vec2(float(i) + param_seed, 3.0)) * param_depth;
|
||||
vec2 pos = base + dir * t * (0.1 + depth * 0.9);
|
||||
pos = fract(pos);
|
||||
vec2 d = pos - p;
|
||||
d = abs(d);
|
||||
d = min(d, 1.0 - d);
|
||||
float dist = length(d);
|
||||
float s = param_size * (0.3 + depth);
|
||||
float star = exp(-dist * dist / max(s * s, 1e-5));
|
||||
float tw = 0.5 + 0.5 * sin(t * 3.0 + param_seed * 10.0 + float(i) * 1.7);
|
||||
star *= mix(1.0, tw, param_twinkle);
|
||||
acc += star;
|
||||
colAcc += star * depth;
|
||||
}
|
||||
acc = clamp(acc, 0.0, 1.0);
|
||||
float mixT = maxN > 1.0 ? colAcc / max(acc, 1e-5) : 0.0;
|
||||
vec3 col = mix(param_color_a.rgb, param_color_b.rgb, mixT);
|
||||
fragColor = vec4(col * acc * u_layer_opacity, acc * u_layer_opacity);
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
// Starfield Generator
|
||||
// HMS MediaEngine – Generator (GLES, Raspberry Pi). ES 2.0: texture2D, gl_FragColor, Schleifen mit konstanter Höchstgrenze.
|
||||
#version 100
|
||||
precision mediump float;
|
||||
|
||||
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 float4 param_color_a;
|
||||
uniform float4 param_color_b;
|
||||
uniform float param_count;
|
||||
uniform float param_size;
|
||||
uniform float param_speed;
|
||||
uniform float param_direction_x;
|
||||
uniform float param_direction_y;
|
||||
uniform float param_depth;
|
||||
uniform float param_twinkle;
|
||||
uniform float param_seed;
|
||||
uniform float u_quality_samples;
|
||||
|
||||
varying vec2 v_uv;
|
||||
|
||||
float hash21(vec2 p)
|
||||
{
|
||||
p = fract(p * vec2(123.34, 456.21));
|
||||
p += dot(p, p + 45.32);
|
||||
return fract(p.x * p.y);
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 p = v_uv;
|
||||
float t = u_time_seconds * param_speed;
|
||||
float maxN = clamp(u_quality_samples, 1.0, 512.0);
|
||||
float dl = length(vec2(param_direction_x, param_direction_y));
|
||||
vec2 dir = dl > 1e-4 ? vec2(param_direction_x, param_direction_y) / dl : vec2(0.0, -1.0);
|
||||
float acc = 0.0;
|
||||
float colAcc = 0.0;
|
||||
for (int i = 0; i < 512; i++)
|
||||
{
|
||||
if (float(i) >= maxN) { break; }
|
||||
vec2 base = vec2(hash21(vec2(float(i) + param_seed, 1.0)), hash21(vec2(float(i) + param_seed, 2.0)));
|
||||
float depth = hash21(vec2(float(i) + param_seed, 3.0)) * param_depth;
|
||||
vec2 pos = base + dir * t * (0.1 + depth * 0.9);
|
||||
pos = fract(pos);
|
||||
vec2 d = pos - p;
|
||||
d = abs(d);
|
||||
d = min(d, 1.0 - d);
|
||||
float dist = length(d);
|
||||
float s = param_size * (0.3 + depth);
|
||||
float star = exp(-dist * dist / max(s * s, 1e-5));
|
||||
float tw = 0.5 + 0.5 * sin(t * 3.0 + param_seed * 10.0 + float(i) * 1.7);
|
||||
star *= mix(1.0, tw, param_twinkle);
|
||||
acc += star;
|
||||
colAcc += star * depth;
|
||||
}
|
||||
acc = clamp(acc, 0.0, 1.0);
|
||||
float mixT = maxN > 1.0 ? colAcc / max(acc, 1e-5) : 0.0;
|
||||
vec3 col = mix(param_color_a.rgb, param_color_b.rgb, mixT);
|
||||
gl_FragColor = vec4(col * acc * u_layer_opacity, acc * u_layer_opacity);
|
||||
}
|
||||
Reference in New Issue
Block a user