diff options
Diffstat (limited to 'tests/manual/scenegraph_lancelot/data/shared/shaders/edge.frag')
-rw-r--r-- | tests/manual/scenegraph_lancelot/data/shared/shaders/edge.frag | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/manual/scenegraph_lancelot/data/shared/shaders/edge.frag b/tests/manual/scenegraph_lancelot/data/shared/shaders/edge.frag new file mode 100644 index 0000000000..8cb616f3e0 --- /dev/null +++ b/tests/manual/scenegraph_lancelot/data/shared/shaders/edge.frag @@ -0,0 +1,14 @@ +uniform lowp sampler2D source; +varying highp vec2 qt_TexCoord0; +uniform highp vec2 textureSize; +uniform lowp vec4 color; +uniform lowp float qt_Opacity; +void main() { + highp vec2 dx = vec2(0.5 / textureSize.x, 0.); + highp vec2 dy = vec2(0., 0.5 / textureSize.y); + gl_FragColor = color * 0.25 + * (texture2D(source, qt_TexCoord0 + dx + dy).a + + texture2D(source, qt_TexCoord0 + dx - dy).a + + texture2D(source, qt_TexCoord0 - dx + dy).a + + texture2D(source, qt_TexCoord0 - dx - dy).a); +} |