mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-19 06:47:02 -04:00
examples: add render-pass-ext exmaple
This commit is contained in:
parent
fce738d78d
commit
77e2b0ad07
20 changed files with 1082 additions and 0 deletions
15
examples/render-pass-ext/vulkan/shaders/triangle.vert
Normal file
15
examples/render-pass-ext/vulkan/shaders/triangle.vert
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#version 450
|
||||
|
||||
// Keep push constants layout compatible with wlroots Vulkan helpers.
|
||||
layout(push_constant, row_major) uniform UBO {
|
||||
mat4 proj;
|
||||
vec4 pos[3];
|
||||
vec4 color[3];
|
||||
} data;
|
||||
|
||||
layout(location = 0) out vec3 v_color;
|
||||
|
||||
void main() {
|
||||
gl_Position = data.proj * vec4(data.pos[gl_VertexIndex].xy, 0.0, 1.0);
|
||||
v_color = data.color[gl_VertexIndex].rgb;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue