rgbswap shader also for Qt5
This commit is contained in:
parent
880ae2abdf
commit
ac2ee95962
|
@ -82,7 +82,6 @@ namespace
|
||||||
|
|
||||||
case BorderRole:
|
case BorderRole:
|
||||||
return updateBoxNode( skinnable, node, Overlay::Panel );
|
return updateBoxNode( skinnable, node, Overlay::Panel );
|
||||||
break;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
@ -123,9 +122,8 @@ namespace
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
clipNode = updateBoxClipNode( overlay, clipNode, Q::Panel );
|
clipNode = updateBoxClipNode( overlay, clipNode, Q::Panel );
|
||||||
}
|
|
||||||
|
|
||||||
QskSGNode::setParentNode( textureNode, clipNode );
|
QskSGNode::setParentNode( textureNode, clipNode );
|
||||||
|
}
|
||||||
|
|
||||||
return clipNode ? clipNode : textureNode;
|
return clipNode ? clipNode : textureNode;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
<qresource>
|
<qresource>
|
||||||
<file>shaders/blur.vert</file>
|
<file>shaders/blur.vert</file>
|
||||||
<file>shaders/blur.frag</file>
|
<file>shaders/blur.frag</file>
|
||||||
|
<file>shaders/rgbswap.frag</file>
|
||||||
|
|
||||||
<file>shaders/blur.vert.qsb</file>
|
<file>shaders/blur.vert.qsb</file>
|
||||||
<file>shaders/blur.frag.qsb</file>
|
<file>shaders/blur.frag.qsb</file>
|
||||||
|
|
||||||
<file>shaders/rgbswap.frag.qsb</file>
|
<file>shaders/rgbswap.frag.qsb</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
|
@ -14,5 +14,5 @@ layout( std140, binding = 0 ) uniform buf
|
||||||
void main()
|
void main()
|
||||||
{
|
{
|
||||||
vec4 c = texture( source, coord );
|
vec4 c = texture( source, coord );
|
||||||
fragColor = c.yzxw * ubuf.opacity;;
|
fragColor = c.yzxw * ubuf.opacity;
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
uniform sampler2D source;
|
||||||
|
uniform lowp float opacity;
|
||||||
|
|
||||||
|
varying highp vec2 coord;
|
||||||
|
|
||||||
|
void main()
|
||||||
|
{
|
||||||
|
vec4 c = texture2D( source, coord );
|
||||||
|
gl_FragColor = c.yzxw * opacity;
|
||||||
|
}
|
|
@ -75,7 +75,7 @@ namespace
|
||||||
QskSceneTexture* m_texture = nullptr;
|
QskSceneTexture* m_texture = nullptr;
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 )
|
#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 )
|
||||||
QOpenGLFramebufferObject* m_fbo;
|
QOpenGLFramebufferObject* m_fbo = nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK( 6, 4, 0 )
|
#if QT_VERSION < QT_VERSION_CHECK( 6, 4, 0 )
|
||||||
|
|
Loading…
Reference in New Issue