diff options
Diffstat (limited to 'tests/baseline/scenegraph/data/shared')
43 files changed, 230 insertions, 0 deletions
diff --git a/tests/baseline/scenegraph/data/shared/blue_72x96.png b/tests/baseline/scenegraph/data/shared/blue_72x96.png Binary files differnew file mode 100644 index 0000000000..ceddd09b4e --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/blue_72x96.png diff --git a/tests/baseline/scenegraph/data/shared/bw_1535x2244.jpg b/tests/baseline/scenegraph/data/shared/bw_1535x2244.jpg Binary files differnew file mode 100644 index 0000000000..0fcf12edc3 --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/bw_1535x2244.jpg diff --git a/tests/baseline/scenegraph/data/shared/circle_16x16.png b/tests/baseline/scenegraph/data/shared/circle_16x16.png Binary files differnew file mode 100644 index 0000000000..9d971e4638 --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/circle_16x16.png diff --git a/tests/baseline/scenegraph/data/shared/col320x480.jpg b/tests/baseline/scenegraph/data/shared/col320x480.jpg Binary files differnew file mode 100644 index 0000000000..c1b54caea8 --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/col320x480.jpg diff --git a/tests/baseline/scenegraph/data/shared/cyan_72x96.png b/tests/baseline/scenegraph/data/shared/cyan_72x96.png Binary files differnew file mode 100644 index 0000000000..b465fa9a62 --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/cyan_72x96.png diff --git a/tests/baseline/scenegraph/data/shared/green_72x96.png b/tests/baseline/scenegraph/data/shared/green_72x96.png Binary files differnew file mode 100644 index 0000000000..9637f71b74 --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/green_72x96.png diff --git a/tests/baseline/scenegraph/data/shared/o1.png b/tests/baseline/scenegraph/data/shared/o1.png Binary files differnew file mode 100644 index 0000000000..a122b5ac33 --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/o1.png diff --git a/tests/baseline/scenegraph/data/shared/o1_bc1.ktx b/tests/baseline/scenegraph/data/shared/o1_bc1.ktx Binary files differnew file mode 100644 index 0000000000..d61194a745 --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/o1_bc1.ktx diff --git a/tests/baseline/scenegraph/data/shared/o2.png b/tests/baseline/scenegraph/data/shared/o2.png Binary files differnew file mode 100644 index 0000000000..fe88b7d03c --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/o2.png diff --git a/tests/baseline/scenegraph/data/shared/o2_bc1.ktx b/tests/baseline/scenegraph/data/shared/o2_bc1.ktx Binary files differnew file mode 100644 index 0000000000..780bb1f3fe --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/o2_bc1.ktx diff --git a/tests/baseline/scenegraph/data/shared/orange_72x96.png b/tests/baseline/scenegraph/data/shared/orange_72x96.png Binary files differnew file mode 100644 index 0000000000..1b2c40ae0a --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/orange_72x96.png diff --git a/tests/baseline/scenegraph/data/shared/red_72x96.png b/tests/baseline/scenegraph/data/shared/red_72x96.png Binary files differnew file mode 100644 index 0000000000..019e5584de --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/red_72x96.png diff --git a/tests/baseline/scenegraph/data/shared/sample_1.png b/tests/baseline/scenegraph/data/shared/sample_1.png Binary files differnew file mode 100644 index 0000000000..d4dd62f254 --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/sample_1.png diff --git a/tests/baseline/scenegraph/data/shared/sand_16x16.png b/tests/baseline/scenegraph/data/shared/sand_16x16.png Binary files differnew file mode 100644 index 0000000000..8a101a7217 --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/sand_16x16.png diff --git a/tests/baseline/scenegraph/data/shared/shaders/basic.frag b/tests/baseline/scenegraph/data/shared/shaders/basic.frag new file mode 100644 index 0000000000..aa850af449 --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/shaders/basic.frag @@ -0,0 +1,8 @@ +#version 440 + +layout(location = 0) in vec2 qt_TexCoord0; +layout(location = 0) out vec4 fragColor; + +void main() { + fragColor = vec4(qt_TexCoord0.x, qt_TexCoord0.y, 1, 1); +} diff --git a/tests/baseline/scenegraph/data/shared/shaders/basic_alpha.frag b/tests/baseline/scenegraph/data/shared/shaders/basic_alpha.frag new file mode 100644 index 0000000000..2fb1fbe91b --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/shaders/basic_alpha.frag @@ -0,0 +1,10 @@ +#version 440 + +layout(location = 0) in vec2 qt_TexCoord0; +layout(location = 0) out vec4 fragColor; + +void main() { + lowp float u = qt_TexCoord0.x; + lowp float v = qt_TexCoord0.y; + fragColor = vec4(u*v, v*v, v, v); +} diff --git a/tests/baseline/scenegraph/data/shared/shaders/cmyk.frag b/tests/baseline/scenegraph/data/shared/shaders/cmyk.frag new file mode 100644 index 0000000000..5d528e1d7a --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/shaders/cmyk.frag @@ -0,0 +1,18 @@ +#version 440 + +layout(location = 0) in vec2 qt_TexCoord0; +layout(location = 0) out vec4 fragColor; + +layout(binding = 1) uniform sampler2D cyan; +layout(binding = 2) uniform sampler2D magenta; +layout(binding = 3) uniform sampler2D yellow; +layout(binding = 4) uniform sampler2D black; + +void main() { + vec2 t = qt_TexCoord0 * 3. - 1.; + lowp float c = texture(cyan, t + vec2(.05, .09)).a; + lowp float m = texture(magenta, t + vec2(.04, -.10)).a; + lowp float y = texture(yellow, t + vec2(-.10, .01)).a; + lowp float k = texture(black, t).a; + fragColor = 1. - vec4(c + k, m + k, y + k, 0.); +} diff --git a/tests/baseline/scenegraph/data/shared/shaders/culling.frag b/tests/baseline/scenegraph/data/shared/shaders/culling.frag new file mode 100644 index 0000000000..cc3c9a0f14 --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/shaders/culling.frag @@ -0,0 +1,13 @@ +#version 440 + +layout(location = 0) in vec2 qt_TexCoord0; +layout(location = 0) out vec4 fragColor; + +layout(binding = 1) uniform sampler2D frontSource; +layout(binding = 2) uniform sampler2D backSource; + +void main() { + fragColor = gl_FrontFacing + ? texture(frontSource, qt_TexCoord0) + : texture(backSource, qt_TexCoord0); +} diff --git a/tests/baseline/scenegraph/data/shared/shaders/desaturate.frag b/tests/baseline/scenegraph/data/shared/shaders/desaturate.frag new file mode 100644 index 0000000000..a4299c6d68 --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/shaders/desaturate.frag @@ -0,0 +1,12 @@ +#version 440 + +layout(location = 0) in vec2 qt_TexCoord0; +layout(location = 0) out vec4 fragColor; +layout(binding = 1) uniform sampler2D source; + +void main() { + lowp vec4 c = texture(source, qt_TexCoord0); + lowp float level = c.r * 0.3 + c.g * 0.59 + c.b * 0.11; + + fragColor = vec4(level, level, level, c.a); +} diff --git a/tests/baseline/scenegraph/data/shared/shaders/edge.frag b/tests/baseline/scenegraph/data/shared/shaders/edge.frag new file mode 100644 index 0000000000..77d7b47499 --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/shaders/edge.frag @@ -0,0 +1,23 @@ +#version 440 + +layout(location = 0) in vec2 qt_TexCoord0; +layout(location = 0) out vec4 fragColor; + +layout(binding = 1) uniform sampler2D source; + +layout(std140, binding = 0) uniform buf { + mat4 qt_Matrix; + float qt_Opacity; + vec2 textureSize; + vec4 color; +} ubuf; + +void main() { + vec2 dx = vec2(0.5 / ubuf.textureSize.x, 0.); + vec2 dy = vec2(0., 0.5 / ubuf.textureSize.y); + fragColor = ubuf.color * 0.25 + * (texture(source, qt_TexCoord0 + dx + dy).a + + texture(source, qt_TexCoord0 + dx - dy).a + + texture(source, qt_TexCoord0 - dx + dy).a + + texture(source, qt_TexCoord0 - dx - dy).a); +} diff --git a/tests/baseline/scenegraph/data/shared/shaders/gradient.frag b/tests/baseline/scenegraph/data/shared/shaders/gradient.frag new file mode 100644 index 0000000000..84eee1dbfe --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/shaders/gradient.frag @@ -0,0 +1,10 @@ +#version 440 + +layout(location = 0) in vec2 qt_TexCoord0; +layout(location = 0) out vec4 fragColor; + +layout(binding = 1) uniform sampler2D source; + +void main() { + fragColor = vec4(qt_TexCoord0.x, qt_TexCoord0.y, 1, 1) * texture(source, qt_TexCoord0).a; +} diff --git a/tests/baseline/scenegraph/data/shared/shaders/gradient2.frag b/tests/baseline/scenegraph/data/shared/shaders/gradient2.frag new file mode 100644 index 0000000000..b08e6339b3 --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/shaders/gradient2.frag @@ -0,0 +1,10 @@ +#version 440 + +layout(location = 0) in vec2 qt_TexCoord0; +layout(location = 0) out vec4 fragColor; + +layout(binding = 1) uniform sampler2D source; + +void main() { + fragColor = vec4(qt_TexCoord0.x, qt_TexCoord0.y, 0, 1) + texture(source, qt_TexCoord0); +} diff --git a/tests/baseline/scenegraph/data/shared/shaders/gradient3.frag b/tests/baseline/scenegraph/data/shared/shaders/gradient3.frag new file mode 100644 index 0000000000..2e523c2879 --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/shaders/gradient3.frag @@ -0,0 +1,10 @@ +#version 440 + +layout(location = 0) in vec2 qt_TexCoord0; +layout(location = 0) out vec4 fragColor; + +layout(binding = 1) uniform sampler2D source; + +void main() { + fragColor = vec4(0, qt_TexCoord0.y, 1, 1) * texture(source, qt_TexCoord0).a; +} diff --git a/tests/baseline/scenegraph/data/shared/shaders/gradient4.frag b/tests/baseline/scenegraph/data/shared/shaders/gradient4.frag new file mode 100644 index 0000000000..a100ba2cd7 --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/shaders/gradient4.frag @@ -0,0 +1,10 @@ +#version 440 + +layout(location = 0) in vec2 qt_TexCoord0; +layout(location = 0) out vec4 fragColor; + +layout(binding = 1) uniform sampler2D source; + +void main() { + fragColor = vec4(1, qt_TexCoord0.y, 0, 1) * texture(source, qt_TexCoord0).a; +} diff --git a/tests/baseline/scenegraph/data/shared/shaders/gradient5.frag b/tests/baseline/scenegraph/data/shared/shaders/gradient5.frag new file mode 100644 index 0000000000..4ec104bd14 --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/shaders/gradient5.frag @@ -0,0 +1,10 @@ +#version 440 + +layout(location = 0) in vec2 qt_TexCoord0; +layout(location = 0) out vec4 fragColor; + +layout(binding = 1) uniform sampler2D source; + +void main() { + fragColor = vec4(qt_TexCoord0.x, 1, 0, 1) * texture(source, qt_TexCoord0).a; +} diff --git a/tests/baseline/scenegraph/data/shared/shaders/gradientgrid.frag b/tests/baseline/scenegraph/data/shared/shaders/gradientgrid.frag new file mode 100644 index 0000000000..999629745b --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/shaders/gradientgrid.frag @@ -0,0 +1,13 @@ +#version 440 + +layout(location = 0) in vec2 qt_TexCoord0; +layout(location = 0) out vec4 fragColor; + +layout(binding = 1) uniform sampler2D source; + +void main() { + lowp float r = mod(qt_TexCoord0.x * 10.0, 1.0); + lowp float g = mod(qt_TexCoord0.y * 10.0, 1.0); + lowp float b = qt_TexCoord0.x; + fragColor = vec4(r, g, b, 1) * texture(source, qt_TexCoord0).a; +} diff --git a/tests/baseline/scenegraph/data/shared/shaders/property.frag b/tests/baseline/scenegraph/data/shared/shaders/property.frag new file mode 100644 index 0000000000..2ffa707fb1 --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/shaders/property.frag @@ -0,0 +1,14 @@ +#version 440 + +layout(location = 0) in vec2 qt_TexCoord0; +layout(location = 0) out vec4 fragColor; + +layout(std140, binding = 0) uniform buf { + mat4 qt_Matrix; + float qt_Opacity; + float colorProperty; +} ubuf; + +void main() { + fragColor = vec4(qt_TexCoord0.x, qt_TexCoord0.y, ubuf.colorProperty, 1); +} diff --git a/tests/baseline/scenegraph/data/shared/shaders/shadow.frag b/tests/baseline/scenegraph/data/shared/shaders/shadow.frag new file mode 100644 index 0000000000..6a2d8dc122 --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/shaders/shadow.frag @@ -0,0 +1,23 @@ +#version 440 + +layout(location = 0) in vec2 qt_TexCoord0; +layout(location = 0) out vec4 fragColor; + +layout(binding = 1) uniform sampler2D source; + +layout(std140, binding = 0) uniform buf { + mat4 qt_Matrix; + float qt_Opacity; + vec2 offset; + vec2 delta; +} ubuf; + +void main() { + vec2 delta2 = vec2(ubuf.delta.x, -ubuf.delta.y); + float shadow = 0.25 * (texture(source, qt_TexCoord0 - ubuf.offset + ubuf.delta).a + + texture(source, qt_TexCoord0 - ubuf.offset - ubuf.delta).a + + texture(source, qt_TexCoord0 - ubuf.offset + delta2).a + + texture(source, qt_TexCoord0 - ubuf.offset - delta2).a); + vec4 color = texture(source, qt_TexCoord0); + fragColor = mix(vec4(vec3(0.), 0.5 * shadow), color, color.a); +} diff --git a/tests/baseline/scenegraph/data/shared/shaders/stencil.frag b/tests/baseline/scenegraph/data/shared/shaders/stencil.frag new file mode 100644 index 0000000000..734be73fdb --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/shaders/stencil.frag @@ -0,0 +1,11 @@ +#version 440 + +layout(location = 0) in vec2 qt_TexCoord0; +layout(location = 0) out vec4 fragColor; + +layout(binding = 1) uniform sampler2D maskSource; +layout(binding = 2) uniform sampler2D colorSource; + +void main() { + fragColor = texture(maskSource, qt_TexCoord0).a * texture(colorSource, qt_TexCoord0.yx); +} diff --git a/tests/baseline/scenegraph/data/shared/shaders/subrect.vert b/tests/baseline/scenegraph/data/shared/shaders/subrect.vert new file mode 100644 index 0000000000..96494b7149 --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/shaders/subrect.vert @@ -0,0 +1,17 @@ +#version 440 + +layout(location = 0) in vec4 qt_Vertex; +layout(location = 1) in vec2 qt_MultiTexCoord0; + +layout(location = 0) out vec2 qt_TexCoord0; + +layout(std140, binding = 0) uniform buf { + mat4 qt_Matrix; + vec4 qt_SubRect_source; +} ubuf; + +void main() +{ + qt_TexCoord0 = ubuf.qt_SubRect_source.xy + ubuf.qt_SubRect_source.zw * qt_MultiTexCoord0; + gl_Position = ubuf.qt_Matrix * qt_Vertex; +} diff --git a/tests/baseline/scenegraph/data/shared/shaders/wave.vert b/tests/baseline/scenegraph/data/shared/shaders/wave.vert new file mode 100644 index 0000000000..38f6173773 --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/shaders/wave.vert @@ -0,0 +1,18 @@ +#version 440 + +layout(location = 0) in vec4 qt_Vertex; +layout(location = 1) in vec2 qt_MultiTexCoord0; + +layout(location = 0) out vec2 qt_TexCoord0; + +layout(std140, binding = 0) uniform buf { + mat4 qt_Matrix; +} ubuf; + +void main() { + vec4 pos = qt_Vertex; + pos.x += sin(qt_Vertex.y * 0.02) * 20.; + pos.y += sin(qt_Vertex.x * 0.02) * 20.; + gl_Position = ubuf.qt_Matrix * pos; + qt_TexCoord0 = qt_MultiTexCoord0; +} diff --git a/tests/baseline/scenegraph/data/shared/square_16x16.png b/tests/baseline/scenegraph/data/shared/square_16x16.png Binary files differnew file mode 100644 index 0000000000..58e37c613f --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/square_16x16.png diff --git a/tests/baseline/scenegraph/data/shared/star_16x16.png b/tests/baseline/scenegraph/data/shared/star_16x16.png Binary files differnew file mode 100644 index 0000000000..930bc8dcc0 --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/star_16x16.png diff --git a/tests/baseline/scenegraph/data/shared/t1.png b/tests/baseline/scenegraph/data/shared/t1.png Binary files differnew file mode 100644 index 0000000000..35e2168c0f --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/t1.png diff --git a/tests/baseline/scenegraph/data/shared/t1_bc2.ktx b/tests/baseline/scenegraph/data/shared/t1_bc2.ktx Binary files differnew file mode 100644 index 0000000000..bc109940e5 --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/t1_bc2.ktx diff --git a/tests/baseline/scenegraph/data/shared/t2.png b/tests/baseline/scenegraph/data/shared/t2.png Binary files differnew file mode 100644 index 0000000000..59fca9eb58 --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/t2.png diff --git a/tests/baseline/scenegraph/data/shared/t2_bc2.ktx b/tests/baseline/scenegraph/data/shared/t2_bc2.ktx Binary files differnew file mode 100644 index 0000000000..fc9ac0841b --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/t2_bc2.ktx diff --git a/tests/baseline/scenegraph/data/shared/tile.png b/tests/baseline/scenegraph/data/shared/tile.png Binary files differnew file mode 100644 index 0000000000..67e21ad80c --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/tile.png diff --git a/tests/baseline/scenegraph/data/shared/uniquepixels.png b/tests/baseline/scenegraph/data/shared/uniquepixels.png Binary files differnew file mode 100644 index 0000000000..83b0f7dbbf --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/uniquepixels.png diff --git a/tests/baseline/scenegraph/data/shared/violet_72x96.png b/tests/baseline/scenegraph/data/shared/violet_72x96.png Binary files differnew file mode 100644 index 0000000000..382e7eca72 --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/violet_72x96.png diff --git a/tests/baseline/scenegraph/data/shared/winter.png b/tests/baseline/scenegraph/data/shared/winter.png Binary files differnew file mode 100644 index 0000000000..6a8a7a7981 --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/winter.png diff --git a/tests/baseline/scenegraph/data/shared/world.png b/tests/baseline/scenegraph/data/shared/world.png Binary files differnew file mode 100644 index 0000000000..ddbe3fe368 --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/world.png diff --git a/tests/baseline/scenegraph/data/shared/yellow_72x96.png b/tests/baseline/scenegraph/data/shared/yellow_72x96.png Binary files differnew file mode 100644 index 0000000000..8f60703a4e --- /dev/null +++ b/tests/baseline/scenegraph/data/shared/yellow_72x96.png |