moved all shader code out of C++ source and into external shader files

General code cleanup and easier maintenance.
This commit is contained in:
itsmattkc
2019-12-10 00:10:00 +11:00
parent 3dc563b697
commit 2fb4047e6f
12 changed files with 56 additions and 62 deletions
+1 -10
View File
@@ -72,16 +72,7 @@ bool OpacityNode::IsAccelerated() const
QString OpacityNode::CodeFragment() const
{
return "#version 110"
"\n"
"varying vec2 olive_tex_coord;\n"
"\n"
"uniform sampler2D tex_in;\n"
"uniform float opacity_in;\n"
"\n"
"void main(void) {\n"
" gl_FragColor = texture2D(tex_in, olive_tex_coord) * (opacity_in * 0.01);\n"
"}\n";
return ReadFileAsString(":/shaders/opacity.frag");
}
NodeInput *OpacityNode::texture_input() const