mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2025-07-04 16:25:27 +08:00
qt 6.5.1 original
This commit is contained in:
17
tests/auto/gui/rhi/qrhi/data/buildshaders.bat
Normal file
17
tests/auto/gui/rhi/qrhi/data/buildshaders.bat
Normal file
@ -0,0 +1,17 @@
|
||||
:: Copyright (C) 2019 The Qt Company Ltd.
|
||||
:: SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
qsb --glsl "150,120,100 es" --hlsl 50 -c --msl 12 -o simple.vert.qsb simple.vert
|
||||
qsb --glsl "150,120,100 es" --hlsl 50 -c --msl 12 -o simple.frag.qsb simple.frag
|
||||
qsb --glsl "150,120,100 es" --hlsl 50 -c --msl 12 -o simpletextured.vert.qsb simpletextured.vert
|
||||
qsb --glsl "150,120,100 es" --hlsl 50 -c --msl 12 -o simpletextured.frag.qsb simpletextured.frag
|
||||
qsb --glsl "150,120,100 es" --hlsl 50 -c --msl 20 -o simpletextured_array.frag.qsb simpletextured_array.frag
|
||||
qsb --glsl "150,120,100 es" --hlsl 50 -c --msl 12 -o simpletextured_separate.frag.qsb simpletextured_separate.frag
|
||||
qsb --glsl "150,120,100 es" --hlsl 50 -c --msl 12 -o textured.vert.qsb textured.vert
|
||||
qsb --glsl "150,120,100 es" --hlsl 50 -c --msl 12 -o textured.frag.qsb textured.frag
|
||||
qsb --glsl "150,120,100 es" --hlsl 50 -c --msl 12 -o textured_multiubuf.vert.qsb textured_multiubuf.vert
|
||||
qsb --glsl "150,120,100 es" --hlsl 50 -c --msl 12 -o textured_multiubuf.frag.qsb textured_multiubuf.frag
|
||||
qsb --glsl 320es,410 --msl 12 --msltess simpletess.vert -o simpletess.vert.qsb
|
||||
qsb --glsl 320es,410 --msl 12 --tess-mode triangles simpletess.tesc -o simpletess.tesc.qsb
|
||||
qsb --glsl 320es,410 --msl 12 --tess-vertex-count 3 simpletess.tese -o simpletess.tese.qsb
|
||||
qsb --glsl 320es,410 --msl 12 simpletess.frag -o simpletess.frag.qsb
|
BIN
tests/auto/gui/rhi/qrhi/data/qt256.png
Normal file
BIN
tests/auto/gui/rhi/qrhi/data/qt256.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.1 KiB |
8
tests/auto/gui/rhi/qrhi/data/simple.frag
Normal file
8
tests/auto/gui/rhi/qrhi/data/simple.frag
Normal file
@ -0,0 +1,8 @@
|
||||
#version 440
|
||||
|
||||
layout(location = 0) out vec4 fragColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
fragColor = vec4(1.0, 0.0, 0.0, 1.0);
|
||||
}
|
BIN
tests/auto/gui/rhi/qrhi/data/simple.frag.qsb
Normal file
BIN
tests/auto/gui/rhi/qrhi/data/simple.frag.qsb
Normal file
Binary file not shown.
10
tests/auto/gui/rhi/qrhi/data/simple.vert
Normal file
10
tests/auto/gui/rhi/qrhi/data/simple.vert
Normal file
@ -0,0 +1,10 @@
|
||||
#version 440
|
||||
|
||||
layout(location = 0) in vec4 position;
|
||||
|
||||
out gl_PerVertex { vec4 gl_Position; };
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = position;
|
||||
}
|
BIN
tests/auto/gui/rhi/qrhi/data/simple.vert.qsb
Normal file
BIN
tests/auto/gui/rhi/qrhi/data/simple.vert.qsb
Normal file
Binary file not shown.
10
tests/auto/gui/rhi/qrhi/data/simpletess.frag
Normal file
10
tests/auto/gui/rhi/qrhi/data/simpletess.frag
Normal file
@ -0,0 +1,10 @@
|
||||
#version 440
|
||||
|
||||
layout(location = 0) in vec3 v_color;
|
||||
|
||||
layout(location = 0) out vec4 fragColor;
|
||||
|
||||
void main()
|
||||
{
|
||||
fragColor = vec4(v_color, 1.0);
|
||||
}
|
BIN
tests/auto/gui/rhi/qrhi/data/simpletess.frag.qsb
Normal file
BIN
tests/auto/gui/rhi/qrhi/data/simpletess.frag.qsb
Normal file
Binary file not shown.
22
tests/auto/gui/rhi/qrhi/data/simpletess.tesc
Normal file
22
tests/auto/gui/rhi/qrhi/data/simpletess.tesc
Normal file
@ -0,0 +1,22 @@
|
||||
#version 440
|
||||
|
||||
layout(vertices = 3) out;
|
||||
|
||||
layout(location = 0) in vec3 inColor[];
|
||||
layout(location = 0) out vec3 outColor[];
|
||||
layout(location = 1) patch out float a_per_patch_output_variable;
|
||||
|
||||
void main()
|
||||
{
|
||||
if (gl_InvocationID == 0) {
|
||||
gl_TessLevelOuter[0] = 4.0;
|
||||
gl_TessLevelOuter[1] = 4.0;
|
||||
gl_TessLevelOuter[2] = 4.0;
|
||||
|
||||
gl_TessLevelInner[0] = 4.0;
|
||||
}
|
||||
|
||||
gl_out[gl_InvocationID].gl_Position = gl_in[gl_InvocationID].gl_Position;
|
||||
outColor[gl_InvocationID] = inColor[gl_InvocationID];
|
||||
a_per_patch_output_variable = 1.0;
|
||||
}
|
BIN
tests/auto/gui/rhi/qrhi/data/simpletess.tesc.qsb
Normal file
BIN
tests/auto/gui/rhi/qrhi/data/simpletess.tesc.qsb
Normal file
Binary file not shown.
17
tests/auto/gui/rhi/qrhi/data/simpletess.tese
Normal file
17
tests/auto/gui/rhi/qrhi/data/simpletess.tese
Normal file
@ -0,0 +1,17 @@
|
||||
#version 440
|
||||
|
||||
layout(triangles, fractional_odd_spacing, ccw) in;
|
||||
|
||||
layout(location = 0) in vec3 inColor[];
|
||||
layout(location = 0) out vec3 outColor;
|
||||
layout(location = 1) patch in float a_per_patch_output_variable;
|
||||
|
||||
layout(std140, binding = 0) uniform buf {
|
||||
mat4 mvp;
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = mvp * ((gl_TessCoord.x * gl_in[0].gl_Position) + (gl_TessCoord.y * gl_in[1].gl_Position) + (gl_TessCoord.z * gl_in[2].gl_Position));
|
||||
outColor = gl_TessCoord.x * inColor[0] + gl_TessCoord.y * inColor[1] + gl_TessCoord.z * inColor[2] * a_per_patch_output_variable;
|
||||
}
|
BIN
tests/auto/gui/rhi/qrhi/data/simpletess.tese.qsb
Normal file
BIN
tests/auto/gui/rhi/qrhi/data/simpletess.tese.qsb
Normal file
Binary file not shown.
12
tests/auto/gui/rhi/qrhi/data/simpletess.vert
Normal file
12
tests/auto/gui/rhi/qrhi/data/simpletess.vert
Normal file
@ -0,0 +1,12 @@
|
||||
#version 440
|
||||
|
||||
layout(location = 0) in vec3 position;
|
||||
layout(location = 1) in vec3 color;
|
||||
|
||||
layout(location = 0) out vec3 v_color;
|
||||
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(position, 1.0);
|
||||
v_color = color;
|
||||
}
|
BIN
tests/auto/gui/rhi/qrhi/data/simpletess.vert.qsb
Normal file
BIN
tests/auto/gui/rhi/qrhi/data/simpletess.vert.qsb
Normal file
Binary file not shown.
13
tests/auto/gui/rhi/qrhi/data/simpletextured.frag
Normal file
13
tests/auto/gui/rhi/qrhi/data/simpletextured.frag
Normal file
@ -0,0 +1,13 @@
|
||||
#version 440
|
||||
|
||||
layout(location = 0) in vec2 uv;
|
||||
layout(location = 0) out vec4 fragColor;
|
||||
|
||||
layout(binding = 0) uniform sampler2D tex;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 c = texture(tex, uv);
|
||||
c.rgb *= c.a;
|
||||
fragColor = c;
|
||||
}
|
BIN
tests/auto/gui/rhi/qrhi/data/simpletextured.frag.qsb
Normal file
BIN
tests/auto/gui/rhi/qrhi/data/simpletextured.frag.qsb
Normal file
Binary file not shown.
14
tests/auto/gui/rhi/qrhi/data/simpletextured.vert
Normal file
14
tests/auto/gui/rhi/qrhi/data/simpletextured.vert
Normal file
@ -0,0 +1,14 @@
|
||||
#version 440
|
||||
|
||||
layout(location = 0) in vec4 position;
|
||||
layout(location = 1) in vec2 texcoord;
|
||||
|
||||
layout(location = 0) out vec2 uv;
|
||||
|
||||
out gl_PerVertex { vec4 gl_Position; };
|
||||
|
||||
void main()
|
||||
{
|
||||
uv = texcoord;
|
||||
gl_Position = position;
|
||||
}
|
BIN
tests/auto/gui/rhi/qrhi/data/simpletextured.vert.qsb
Normal file
BIN
tests/auto/gui/rhi/qrhi/data/simpletextured.vert.qsb
Normal file
Binary file not shown.
17
tests/auto/gui/rhi/qrhi/data/simpletextured_array.frag
Normal file
17
tests/auto/gui/rhi/qrhi/data/simpletextured_array.frag
Normal file
@ -0,0 +1,17 @@
|
||||
#version 440
|
||||
|
||||
layout(location = 0) in vec2 uv;
|
||||
layout(location = 0) out vec4 fragColor;
|
||||
|
||||
layout(binding = 0) uniform sampler2D tex[3];
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 c0 = texture(tex[0], uv);
|
||||
vec4 c1 = texture(tex[1], uv);
|
||||
vec4 c2 = texture(tex[2], uv);
|
||||
vec4 cc = c0 + c1 + c2;
|
||||
vec4 c = vec4(clamp(cc.r, 0.0, 1.0), clamp(cc.g, 0.0, 1.0), clamp(cc.b, 0.0, 1.0), clamp(cc.a, 0.0, 1.0));
|
||||
c.rgb *= c.a;
|
||||
fragColor = c;
|
||||
}
|
BIN
tests/auto/gui/rhi/qrhi/data/simpletextured_array.frag.qsb
Normal file
BIN
tests/auto/gui/rhi/qrhi/data/simpletextured_array.frag.qsb
Normal file
Binary file not shown.
14
tests/auto/gui/rhi/qrhi/data/simpletextured_separate.frag
Normal file
14
tests/auto/gui/rhi/qrhi/data/simpletextured_separate.frag
Normal file
@ -0,0 +1,14 @@
|
||||
#version 440
|
||||
|
||||
layout(location = 0) in vec2 uv;
|
||||
layout(location = 0) out vec4 fragColor;
|
||||
|
||||
layout(binding = 3) uniform texture2D tex;
|
||||
layout(binding = 5) uniform sampler samp;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 c = texture(sampler2D(tex, samp), uv);
|
||||
c.rgb *= c.a;
|
||||
fragColor = c;
|
||||
}
|
BIN
tests/auto/gui/rhi/qrhi/data/simpletextured_separate.frag.qsb
Normal file
BIN
tests/auto/gui/rhi/qrhi/data/simpletextured_separate.frag.qsb
Normal file
Binary file not shown.
19
tests/auto/gui/rhi/qrhi/data/textured.frag
Normal file
19
tests/auto/gui/rhi/qrhi/data/textured.frag
Normal file
@ -0,0 +1,19 @@
|
||||
#version 440
|
||||
|
||||
layout(location = 0) in vec2 uv;
|
||||
layout(location = 0) out vec4 fragColor;
|
||||
|
||||
layout(std140, binding = 0) uniform buf {
|
||||
mat4 matrix;
|
||||
float opacity;
|
||||
} ubuf;
|
||||
|
||||
layout(binding = 1) uniform sampler2D tex;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 c = texture(tex, uv);
|
||||
c.a *= ubuf.opacity;
|
||||
c.rgb *= c.a;
|
||||
fragColor = c;
|
||||
}
|
BIN
tests/auto/gui/rhi/qrhi/data/textured.frag.qsb
Normal file
BIN
tests/auto/gui/rhi/qrhi/data/textured.frag.qsb
Normal file
Binary file not shown.
19
tests/auto/gui/rhi/qrhi/data/textured.vert
Normal file
19
tests/auto/gui/rhi/qrhi/data/textured.vert
Normal file
@ -0,0 +1,19 @@
|
||||
#version 440
|
||||
|
||||
layout(location = 0) in vec4 position;
|
||||
layout(location = 1) in vec2 texcoord;
|
||||
|
||||
layout(location = 0) out vec2 uv;
|
||||
|
||||
layout(std140, binding = 0) uniform buf {
|
||||
mat4 matrix;
|
||||
float opacity;
|
||||
} ubuf;
|
||||
|
||||
out gl_PerVertex { vec4 gl_Position; };
|
||||
|
||||
void main()
|
||||
{
|
||||
uv = texcoord;
|
||||
gl_Position = ubuf.matrix * position;
|
||||
}
|
BIN
tests/auto/gui/rhi/qrhi/data/textured.vert.qsb
Normal file
BIN
tests/auto/gui/rhi/qrhi/data/textured.vert.qsb
Normal file
Binary file not shown.
18
tests/auto/gui/rhi/qrhi/data/textured_multiubuf.frag
Normal file
18
tests/auto/gui/rhi/qrhi/data/textured_multiubuf.frag
Normal file
@ -0,0 +1,18 @@
|
||||
#version 440
|
||||
|
||||
layout(location = 0) in vec2 uv;
|
||||
layout(location = 0) out vec4 fragColor;
|
||||
|
||||
layout(std140, binding = 1) uniform buf {
|
||||
float opacity;
|
||||
} fubuf;
|
||||
|
||||
layout(binding = 2) uniform sampler2D tex;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 c = texture(tex, uv);
|
||||
c.a *= fubuf.opacity;
|
||||
c.rgb *= c.a;
|
||||
fragColor = c;
|
||||
}
|
BIN
tests/auto/gui/rhi/qrhi/data/textured_multiubuf.frag.qsb
Normal file
BIN
tests/auto/gui/rhi/qrhi/data/textured_multiubuf.frag.qsb
Normal file
Binary file not shown.
18
tests/auto/gui/rhi/qrhi/data/textured_multiubuf.vert
Normal file
18
tests/auto/gui/rhi/qrhi/data/textured_multiubuf.vert
Normal file
@ -0,0 +1,18 @@
|
||||
#version 440
|
||||
|
||||
layout(location = 0) in vec4 position;
|
||||
layout(location = 1) in vec2 texcoord;
|
||||
|
||||
layout(location = 0) out vec2 uv;
|
||||
|
||||
layout(std140, binding = 0) uniform buf {
|
||||
mat4 matrix;
|
||||
} vubuf;
|
||||
|
||||
out gl_PerVertex { vec4 gl_Position; };
|
||||
|
||||
void main()
|
||||
{
|
||||
uv = texcoord;
|
||||
gl_Position = vubuf.matrix * position;
|
||||
}
|
BIN
tests/auto/gui/rhi/qrhi/data/textured_multiubuf.vert.qsb
Normal file
BIN
tests/auto/gui/rhi/qrhi/data/textured_multiubuf.vert.qsb
Normal file
Binary file not shown.
Reference in New Issue
Block a user