aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/scenegraph/fboitem/shaders
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/scenegraph/fboitem/shaders')
-rw-r--r--examples/quick/scenegraph/fboitem/shaders/+qsb/checker.fragbin1615 -> 0 bytes
-rw-r--r--examples/quick/scenegraph/fboitem/shaders/checker.frag22
-rw-r--r--examples/quick/scenegraph/fboitem/shaders/checker.frag.qsbbin0 -> 953 bytes
-rw-r--r--examples/quick/scenegraph/fboitem/shaders/checker_rhi.frag22
4 files changed, 15 insertions, 29 deletions
diff --git a/examples/quick/scenegraph/fboitem/shaders/+qsb/checker.frag b/examples/quick/scenegraph/fboitem/shaders/+qsb/checker.frag
deleted file mode 100644
index 5037899d19..0000000000
--- a/examples/quick/scenegraph/fboitem/shaders/+qsb/checker.frag
+++ /dev/null
Binary files differ
diff --git a/examples/quick/scenegraph/fboitem/shaders/checker.frag b/examples/quick/scenegraph/fboitem/shaders/checker.frag
index 044b3bad58..1e4131d026 100644
--- a/examples/quick/scenegraph/fboitem/shaders/checker.frag
+++ b/examples/quick/scenegraph/fboitem/shaders/checker.frag
@@ -1,14 +1,22 @@
-uniform lowp vec4 color1;
-uniform lowp vec4 color2;
-uniform highp vec2 pixelSize;
+#version 440
-varying highp vec2 qt_TexCoord0;
+layout(std140, binding = 0) uniform buf {
+ mat4 qt_Matrix;
+ float qt_Opacity;
+
+ vec4 color1;
+ vec4 color2;
+ vec2 pixelSize;
+} ubuf;
+
+layout(location = 0) in vec2 qt_TexCoord0;
+layout(location = 0) out vec4 fragColor;
void main()
{
- highp vec2 tc = sign(sin(3.14159265358979323846 * qt_TexCoord0 * pixelSize));
+ vec2 tc = sign(sin(3.14159265358979323846 * qt_TexCoord0 * ubuf.pixelSize));
if (tc.x != tc.y)
- gl_FragColor = color1;
+ fragColor = ubuf.color1;
else
- gl_FragColor = color2;
+ fragColor = ubuf.color2;
}
diff --git a/examples/quick/scenegraph/fboitem/shaders/checker.frag.qsb b/examples/quick/scenegraph/fboitem/shaders/checker.frag.qsb
new file mode 100644
index 0000000000..77cbf0b867
--- /dev/null
+++ b/examples/quick/scenegraph/fboitem/shaders/checker.frag.qsb
Binary files differ
diff --git a/examples/quick/scenegraph/fboitem/shaders/checker_rhi.frag b/examples/quick/scenegraph/fboitem/shaders/checker_rhi.frag
deleted file mode 100644
index 1e4131d026..0000000000
--- a/examples/quick/scenegraph/fboitem/shaders/checker_rhi.frag
+++ /dev/null
@@ -1,22 +0,0 @@
-#version 440
-
-layout(std140, binding = 0) uniform buf {
- mat4 qt_Matrix;
- float qt_Opacity;
-
- vec4 color1;
- vec4 color2;
- vec2 pixelSize;
-} ubuf;
-
-layout(location = 0) in vec2 qt_TexCoord0;
-layout(location = 0) out vec4 fragColor;
-
-void main()
-{
- vec2 tc = sign(sin(3.14159265358979323846 * qt_TexCoord0 * ubuf.pixelSize));
- if (tc.x != tc.y)
- fragColor = ubuf.color1;
- else
- fragColor = ubuf.color2;
-}