Add example GLGL for source input, fix header input documentation

This commit is contained in:
brunoherbelin
2025-11-22 23:55:12 +01:00
parent c6f104b5ae
commit 76e23d5e5e
3 changed files with 15 additions and 2 deletions

View File

@@ -719,6 +719,7 @@ set(VMIX_RSC_FILES
./rsc/shaders/filters/RGBnoise.glsl
./rsc/shaders/filters/3DPerlinNoise.glsl
./rsc/shaders/filters/3DSimplexNoise.glsl
./rsc/shaders/filters/source.glsl
./rsc/images/logo.vmx
)

View File

@@ -0,0 +1,12 @@
// Texture from external Source
// by Bruno Herbelin for vimix
uniform sampler2D Source;
void mainImage( out vec4 fragColor, in vec2 fragCoord )
{
vec2 uv = fragCoord.xy / iResolution.xy;
fragColor = texture(Source, uv);
}

View File

@@ -80,6 +80,7 @@ std::list< FilteringProgram > FilteringProgram::example_filters = {
};
std::list< FilteringProgram > FilteringProgram::example_patterns = {
FilteringProgram("Source", "shaders/filters/source.glsl", "", { }),
FilteringProgram("Color", "shaders/filters/color.glsl", "", { }),
FilteringProgram("Color noise", "shaders/filters/RGBnoise.glsl", "", { }),
FilteringProgram("Simplex Noise", "shaders/filters/3DSimplexNoise.glsl", "", { }),
@@ -94,9 +95,8 @@ std::string FilteringProgram::getFilterCodeInputs()
"float iTime; // shader playback time (in seconds)\n"
"float iTimeDelta; // render time (in seconds)\n"
"int iFrame; // shader playback frame\n"
"vec3 iChannelResolution[2]; // input channels resolution (in pixels)\n"
"vec3 iChannelResolution[1]; // input channels resolution (in pixels)\n"
"sampler2D iChannel0; // input channel 0 (source).\n"
"sampler2D iChannel1; // input channel 1 (display loopback).\n"
"vec4 iDate; // (year, month, day, time in seconds)\n"
"vec4 iMouse; // simulate mouse input with sliders:";
return filterHeaderHelp;