mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2025-07-05 00:35:27 +08:00
qt 6.5.1 original
This commit is contained in:
18
tests/auto/gui/rhi/qshader/data_src/color.vert
Normal file
18
tests/auto/gui/rhi/qshader/data_src/color.vert
Normal file
@ -0,0 +1,18 @@
|
||||
#version 440
|
||||
|
||||
layout(location = 0) in vec4 position;
|
||||
layout(location = 1) in vec3 color;
|
||||
layout(location = 0) out vec3 v_color;
|
||||
|
||||
layout(std140, binding = 0) uniform buf {
|
||||
mat4 mvp;
|
||||
float opacity;
|
||||
} ubuf;
|
||||
|
||||
out gl_PerVertex { vec4 gl_Position; };
|
||||
|
||||
void main()
|
||||
{
|
||||
v_color = color;
|
||||
gl_Position = ubuf.mvp * position;
|
||||
}
|
16
tests/auto/gui/rhi/qshader/data_src/texture.frag
Normal file
16
tests/auto/gui/rhi/qshader/data_src/texture.frag
Normal file
@ -0,0 +1,16 @@
|
||||
#version 440
|
||||
|
||||
layout(location = 0) in vec2 qt_TexCoord;
|
||||
layout(location = 0) out vec4 fragColor;
|
||||
|
||||
layout(std140, binding = 0) uniform buf {
|
||||
mat4 qt_Matrix;
|
||||
float opacity;
|
||||
} ubuf;
|
||||
|
||||
layout(binding = 1) uniform sampler2D qt_Texture;
|
||||
|
||||
void main()
|
||||
{
|
||||
fragColor = texture(qt_Texture, qt_TexCoord) * ubuf.opacity;
|
||||
}
|
17
tests/auto/gui/rhi/qshader/data_src/texture_sep.frag
Normal file
17
tests/auto/gui/rhi/qshader/data_src/texture_sep.frag
Normal file
@ -0,0 +1,17 @@
|
||||
#version 440
|
||||
|
||||
layout(location = 0) in vec2 v_texcoord;
|
||||
|
||||
layout(location = 0) out vec4 fragColor;
|
||||
|
||||
layout(binding = 1) uniform sampler2D combinedTexSampler;
|
||||
layout(binding = 2) uniform texture2D sepTex;
|
||||
layout(binding = 3) uniform sampler sepSampler;
|
||||
layout(binding = 4) uniform sampler sepSampler2;
|
||||
|
||||
void main()
|
||||
{
|
||||
fragColor = texture(sampler2D(sepTex, sepSampler), v_texcoord);
|
||||
fragColor *= texture(sampler2D(sepTex, sepSampler2), v_texcoord);
|
||||
fragColor *= texture(combinedTexSampler, v_texcoord);
|
||||
}
|
Reference in New Issue
Block a user