Implement FadingMaterial frag/vert shaders on core profile
Summary: Like all the inbuilt shaders this now has a separate GLS source file which works with a newer version without requiring compatibility. Was https://git.reviewboard.kde.org/r/128426/ Test Plan: Ran plasmashell with ForceGlCoreProfile set in the config Hovered an icon in the task manager and it animated to the correct one correctly. Ran glslangValidator on both files. No warnings. Reviewers: #plasma, mart Reviewed By: mart Subscribers: mart, plasma-devel, #frameworks Tags: #plasma, #frameworks Differential Revision: https://phabricator.kde.org/D4851
This commit is contained in:
parent
3b05f569ac
commit
23b70f4d45
11
src/declarativeimports/core/fadingmaterial_core.frag
Normal file
11
src/declarativeimports/core/fadingmaterial_core.frag
Normal file
@ -0,0 +1,11 @@
|
||||
#version 150 core
|
||||
in highp vec2 v_coord;
|
||||
uniform sampler2D u_src;
|
||||
uniform sampler2D u_target;
|
||||
uniform highp float u_transitionProgress;
|
||||
uniform lowp float qt_Opacity;
|
||||
void main() {
|
||||
lowp vec4 tex1 = texture2D(u_target, v_coord);
|
||||
lowp vec4 tex2 = texture2D(u_src, v_coord);
|
||||
gl_FragColor = mix(tex2, tex1, u_transitionProgress) * qt_Opacity;
|
||||
}
|
9
src/declarativeimports/core/fadingmaterial_core.vert
Normal file
9
src/declarativeimports/core/fadingmaterial_core.vert
Normal file
@ -0,0 +1,9 @@
|
||||
#version 150 core
|
||||
uniform highp mat4 qt_Matrix;
|
||||
in highp vec4 qt_Vertex;
|
||||
in highp vec2 qt_MultiTexCoord0;
|
||||
out highp vec2 v_coord;
|
||||
void main() {
|
||||
v_coord = qt_MultiTexCoord0;
|
||||
gl_Position = qt_Matrix * qt_Vertex;
|
||||
}
|
@ -2,5 +2,7 @@
|
||||
<qresource prefix="/plasma-framework/shaders">
|
||||
<file>fadingmaterial.vert</file>
|
||||
<file>fadingmaterial.frag</file>
|
||||
<file>fadingmaterial_core.vert</file>
|
||||
<file>fadingmaterial_core.frag</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
Loading…
Reference in New Issue
Block a user