44 #include <ACG/GL/acg_glew.hh> 46 #include "PostProcessorSobelPlugin.hh" 48 #include <ACG/GL/ScreenQuad.hh> 52 PostProcessorSobelPlugin::PostProcessorSobelPlugin() :
57 PostProcessorSobelPlugin::~PostProcessorSobelPlugin()
63 QString PostProcessorSobelPlugin::postProcessorName() {
64 return QString(
"Sobel");
67 void PostProcessorSobelPlugin::postProcess(
ACG::GLState* _glstate,
const std::vector<const PostProcessorInput*>& _input,
const PostProcessorOutput& _output) {
79 _input[0]->bindColorTex(0);
92 shader_->setUniform(
"textureSampler", 0);
94 ACG::Vec2f texcoordOffset(1.0f /
float(_input[0]->width), 1.0f /
float(_input[0]->height));
95 shader_->setUniform(
"texcoordOffset", texcoordOffset);
static void draw(GLSL::Program *_prog=0)
Draw the screen quad.
GLSL::PtrProgram loadProgram(const char *vertexShaderFile, const char *tessControlShaderFile, const char *tessEvaluationShaderFile, const char *geometryShaderFile, const char *fragmentShaderFile, const GLSL::StringList *macros, bool verbose)