implement glsl hack for corner pin
This commit is contained in:
@@ -97,8 +97,18 @@ void CornerPinDistortNode::Value(const NodeValueRow &value, const NodeGlobals &g
|
||||
ShaderCode CornerPinDistortNode::GetShaderCode(const QString &shader_id) const
|
||||
{
|
||||
Q_UNUSED(shader_id)
|
||||
return ShaderCode(FileFunctions::ReadFileAsString(QStringLiteral(":/shaders/cornerpin.frag")),
|
||||
FileFunctions::ReadFileAsString(QStringLiteral(":/shaders/cornerpin.vert")));
|
||||
QString frag = FileFunctions::ReadFileAsString(QStringLiteral(":/shaders/cornerpin.frag"));
|
||||
QString vert = FileFunctions::ReadFileAsString(QStringLiteral(":/shaders/cornerpin.vert"));
|
||||
|
||||
// HACK: No good, very bad hack
|
||||
#ifndef Q_OS_MAC
|
||||
frag.prepend(QStringLiteral("#version 130"));
|
||||
vert.prepend(QStringLiteral("#version 130"));
|
||||
#else
|
||||
vert.prepend(QStringLiteral("#extension GL_EXT_gpu_shader4 : require"));
|
||||
#endif
|
||||
|
||||
return ShaderCode(frag, vert);
|
||||
}
|
||||
|
||||
QPointF CornerPinDistortNode::ValueToPixel(int value, const NodeValueRow& row, const QVector2D &resolution) const
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#version 130
|
||||
|
||||
// Input texture
|
||||
uniform sampler2D ove_maintex;
|
||||
uniform sampler2D tex_in;
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#version 130
|
||||
|
||||
uniform bool perspective_in;
|
||||
uniform vec2 top_left_in;
|
||||
uniform vec2 top_right_in;
|
||||
|
||||
Reference in New Issue
Block a user