diff options
author | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2019-12-13 12:07:18 +0100 |
---|---|---|
committer | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2020-01-06 15:17:09 +0100 |
commit | 0c2eaad357e555ccaf4fecf42aef03576bbae133 (patch) | |
tree | ea115a0d3e4e2d3dbdea54ba4818b6d6a25c45fe /tests/manual/scenegraph_lancelot/data/shaders/texture | |
parent | cba6f48613fad1718edc5823b39bc4c7f7300dee (diff) |
Add RHI shaders to ShaderEffect test scenes
Add RHI versions of the fragment and vertex shaders in the lancelot
test scenes. Move all shaders into external files and include them as
resources, so that the automatic file selector mechanism will pick up
the right version at runtime.
Task-number: QTBUG-78683
Change-Id: I5eb1669d09a650301ac2a3012db8b3d1814c7bcb
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'tests/manual/scenegraph_lancelot/data/shaders/texture')
-rw-r--r-- | tests/manual/scenegraph_lancelot/data/shaders/texture/size.qml | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/tests/manual/scenegraph_lancelot/data/shaders/texture/size.qml b/tests/manual/scenegraph_lancelot/data/shaders/texture/size.qml index ab8db47009..5738da5e8d 100644 --- a/tests/manual/scenegraph_lancelot/data/shaders/texture/size.qml +++ b/tests/manual/scenegraph_lancelot/data/shaders/texture/size.qml @@ -18,22 +18,7 @@ Item { property variant textureSize: source.textureSize property color color: "black" - fragmentShader: " - 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); - } - " + fragmentShader: "qrc:shaders/edge.frag" } Text { |