mirror of
https://github.com/crystalidea/qt6windows7.git
synced 2025-07-05 08:45:25 +08:00
qt 6.6.0 clean
This commit is contained in:
15
examples/gui/rhiwindow/shaders/color.frag
Normal file
15
examples/gui/rhiwindow/shaders/color.frag
Normal file
@ -0,0 +1,15 @@
|
||||
#version 440
|
||||
|
||||
layout(location = 0) in vec3 v_color;
|
||||
|
||||
layout(location = 0) out vec4 fragColor;
|
||||
|
||||
layout(std140, binding = 0) uniform buf {
|
||||
mat4 mvp;
|
||||
float opacity;
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
fragColor = vec4(v_color * opacity, opacity);
|
||||
}
|
17
examples/gui/rhiwindow/shaders/color.vert
Normal file
17
examples/gui/rhiwindow/shaders/color.vert
Normal file
@ -0,0 +1,17 @@
|
||||
#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;
|
||||
};
|
||||
|
||||
void main()
|
||||
{
|
||||
v_color = color;
|
||||
gl_Position = mvp * position;
|
||||
}
|
BIN
examples/gui/rhiwindow/shaders/prebuilt/color.frag.qsb
Normal file
BIN
examples/gui/rhiwindow/shaders/prebuilt/color.frag.qsb
Normal file
Binary file not shown.
BIN
examples/gui/rhiwindow/shaders/prebuilt/color.vert.qsb
Normal file
BIN
examples/gui/rhiwindow/shaders/prebuilt/color.vert.qsb
Normal file
Binary file not shown.
BIN
examples/gui/rhiwindow/shaders/prebuilt/quad.frag.qsb
Normal file
BIN
examples/gui/rhiwindow/shaders/prebuilt/quad.frag.qsb
Normal file
Binary file not shown.
BIN
examples/gui/rhiwindow/shaders/prebuilt/quad.vert.qsb
Normal file
BIN
examples/gui/rhiwindow/shaders/prebuilt/quad.vert.qsb
Normal file
Binary file not shown.
11
examples/gui/rhiwindow/shaders/quad.frag
Normal file
11
examples/gui/rhiwindow/shaders/quad.frag
Normal file
@ -0,0 +1,11 @@
|
||||
#version 440
|
||||
|
||||
layout(location = 0) in vec2 v_uv;
|
||||
layout(location = 0) out vec4 fragColor;
|
||||
layout(binding = 0) uniform sampler2D tex;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec4 c = texture(tex, v_uv);
|
||||
fragColor = vec4(c.rgb * c.a, c.a);
|
||||
}
|
10
examples/gui/rhiwindow/shaders/quad.vert
Normal file
10
examples/gui/rhiwindow/shaders/quad.vert
Normal file
@ -0,0 +1,10 @@
|
||||
#version 440
|
||||
|
||||
layout (location = 0) out vec2 v_uv;
|
||||
|
||||
void main()
|
||||
{
|
||||
// https://www.saschawillems.de/blog/2016/08/13/vulkan-tutorial-on-rendering-a-fullscreen-quad-without-buffers/
|
||||
v_uv = vec2((gl_VertexIndex << 1) & 2, gl_VertexIndex & 2);
|
||||
gl_Position = vec4(v_uv * 2.0 - 1.0, 0.0, 1.0);
|
||||
}
|
Reference in New Issue
Block a user