rgbswap shader also for Qt5

This commit is contained in:
Uwe Rathmann 2023-12-27 09:01:37 +01:00
parent 880ae2abdf
commit ac2ee95962
5 changed files with 14 additions and 6 deletions

View File

@ -82,7 +82,6 @@ namespace
case BorderRole:
return updateBoxNode( skinnable, node, Overlay::Panel );
break;
};
return nullptr;
@ -123,10 +122,9 @@ namespace
else
{
clipNode = updateBoxClipNode( overlay, clipNode, Q::Panel );
QskSGNode::setParentNode( textureNode, clipNode );
}
QskSGNode::setParentNode( textureNode, clipNode );
return clipNode ? clipNode : textureNode;
}

View File

@ -3,10 +3,10 @@
<qresource>
<file>shaders/blur.vert</file>
<file>shaders/blur.frag</file>
<file>shaders/rgbswap.frag</file>
<file>shaders/blur.vert.qsb</file>
<file>shaders/blur.frag.qsb</file>
<file>shaders/rgbswap.frag.qsb</file>
</qresource>
</RCC>

View File

@ -14,5 +14,5 @@ layout( std140, binding = 0 ) uniform buf
void main()
{
vec4 c = texture( source, coord );
fragColor = c.yzxw * ubuf.opacity;;
fragColor = c.yzxw * ubuf.opacity;
}

View File

@ -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;
}

View File

@ -75,7 +75,7 @@ namespace
QskSceneTexture* m_texture = nullptr;
#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 )
QOpenGLFramebufferObject* m_fbo;
QOpenGLFramebufferObject* m_fbo = nullptr;
#endif
#if QT_VERSION < QT_VERSION_CHECK( 6, 4, 0 )