mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 10:19:59 +01:00
Add example GLGL for source input, fix header input documentation
This commit is contained in:
@@ -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
|
||||
)
|
||||
|
||||
|
||||
12
rsc/shaders/filters/source.glsl
Normal file
12
rsc/shaders/filters/source.glsl
Normal 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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user