ported ALL effects to opengl

This commit is contained in:
itsmattkc
2018-09-02 16:57:50 +10:00
parent cf35ea23bb
commit 0e8810109a
30 changed files with 485 additions and 168 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
#include "chromakeyeffect.h"
ChromaKeyEffect::ChromaKeyEffect(Clip* c) : Effect(c, EFFECT_TYPE_VIDEO, VIDEO_CHROMAKEY_EFFECT) {
enable_opengl = true;
enable_shader = true;
color_field = add_row("Color:")->add_field(EFFECT_FIELD_COLOR);
tolerance_field = add_row("Tolerance:")->add_field(EFFECT_FIELD_DOUBLE);
@@ -19,7 +19,7 @@ ChromaKeyEffect::ChromaKeyEffect(Clip* c) : Effect(c, EFFECT_TYPE_VIDEO, VIDEO_C
connect(tolerance_field, SIGNAL(changed()), this, SLOT(field_changed()));
}
void ChromaKeyEffect::process_gl(double timecode, GLTextureCoords&) {
void ChromaKeyEffect::process_shader(double timecode) {
glslProgram->setUniformValue("keyColor", color_field->get_color_value(timecode));
glslProgram->setUniformValue("threshold", (GLfloat) (tolerance_field->get_double_value(timecode)*0.01));
}