Merge branch 'master' into nodeview-redux
This commit is contained in:
@@ -47,14 +47,14 @@ ShaderCode MathNodeBase::GetShaderCodeInternal(const QString &shader_id, const Q
|
||||
const QString& mat_in = (type_a == NodeValue::kTexture) ? param_b_in : param_a_in;
|
||||
|
||||
// No-op frag shader (can we return QString() instead?)
|
||||
operation = QStringLiteral("texture(%1, ove_texcoord)").arg(tex_in);
|
||||
operation = QStringLiteral("texture2D(%1, ove_texcoord)").arg(tex_in);
|
||||
|
||||
vert = QStringLiteral("uniform mat4 %1;\n"
|
||||
"\n"
|
||||
"in vec4 a_position;\n"
|
||||
"in vec2 a_texcoord;\n"
|
||||
"attribute vec4 a_position;\n"
|
||||
"attribute vec2 a_texcoord;\n"
|
||||
"\n"
|
||||
"out vec2 ove_texcoord;\n"
|
||||
"varying vec2 ove_texcoord;\n"
|
||||
"\n"
|
||||
"void main() {\n"
|
||||
" gl_Position = %1 * a_position;\n"
|
||||
@@ -96,12 +96,10 @@ ShaderCode MathNodeBase::GetShaderCodeInternal(const QString &shader_id, const Q
|
||||
frag = QStringLiteral("uniform %1 %3;\n"
|
||||
"uniform %2 %4;\n"
|
||||
"\n"
|
||||
"in vec2 ove_texcoord;\n"
|
||||
"\n"
|
||||
"out vec4 fragColor;\n"
|
||||
"varying vec2 ove_texcoord;\n"
|
||||
"\n"
|
||||
"void main(void) {\n"
|
||||
" fragColor = %5;\n"
|
||||
" gl_FragColor = %5;\n"
|
||||
"}\n").arg(GetShaderUniformType(type_a),
|
||||
GetShaderUniformType(type_b),
|
||||
param_a_in,
|
||||
@@ -128,7 +126,7 @@ QString MathNodeBase::GetShaderUniformType(const olive::NodeValue::Type &type)
|
||||
QString MathNodeBase::GetShaderVariableCall(const QString &input_id, const NodeValue::Type &type, const QString& coord_op)
|
||||
{
|
||||
if (type == NodeValue::kTexture) {
|
||||
return QStringLiteral("texture(%1, ove_texcoord%2)").arg(input_id, coord_op);
|
||||
return QStringLiteral("texture2D(%1, ove_texcoord%2)").arg(input_id, coord_op);
|
||||
}
|
||||
|
||||
return input_id;
|
||||
|
||||
Reference in New Issue
Block a user