ported ALL effects to opengl
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user