33 lines
900 B
GLSL
33 lines
900 B
GLSL
|
|
#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);
|
|||
|
|
}
|