moved all shader code out of C++ source and into external shader files
General code cleanup and easier maintenance.
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
#version 110
|
||||
|
||||
varying vec2 ove_texcoord;
|
||||
|
||||
uniform sampler2D base_in;
|
||||
uniform sampler2D blend_in;
|
||||
|
||||
void main(void) {
|
||||
vec4 base_col = texture2D(base_in, ove_texcoord);
|
||||
vec4 blend_col = texture2D(blend_in, ove_texcoord);
|
||||
base_col *= 1.0 - blend_col.a;
|
||||
base_col += blend_col;
|
||||
|
||||
gl_FragColor = base_col;
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
#version 110
|
||||
|
||||
varying vec2 ove_texcoord;
|
||||
|
||||
uniform sampler2D base_in;
|
||||
uniform sampler2D blend_in;
|
||||
|
||||
void main(void) {
|
||||
vec4 base_col = texture2D(base_in, ove_texcoord);
|
||||
vec4 blend_col = texture2D(blend_in, ove_texcoord);
|
||||
base_col *= 1.0 - blend_col.a;
|
||||
base_col += blend_col;
|
||||
|
||||
gl_FragColor = base_col;
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
#version 110
|
||||
|
||||
varying vec2 ove_tex_coord;
|
||||
|
||||
uniform sampler2D tex_in;
|
||||
uniform float opacity_in;
|
||||
|
||||
void main(void) {
|
||||
gl_FragColor = texture2D(tex_in, ove_tex_coord) * (opacity_in * 0.01);
|
||||
}
|
||||
@@ -1,5 +1,9 @@
|
||||
<RCC>
|
||||
<qresource prefix="/shaders">
|
||||
<file>alphaover.frag</file>
|
||||
<file>crossdissolve.frag</file>
|
||||
<file>opacity.frag</file>
|
||||
<file>solid.frag</file>
|
||||
<file>videoinput.frag</file>
|
||||
<file>videoinput.vert</file>
|
||||
</qresource>
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
#version 110
|
||||
|
||||
uniform vec4 color_in;
|
||||
|
||||
void main(void) {
|
||||
gl_FragColor = color_in;
|
||||
}
|
||||
Reference in New Issue
Block a user