weston/libweston/renderer-vulkan/vulkan_vertex_shader_surface.vert
Erico Nunes 8f56d03d4b libweston: Vulkan renderer
A Vulkan renderer for weston, based on the GL renderer.
The goal is to impose the least requirements as possible on Vulkan
implementations, as to allow even Vulkan 1.0 (or early development)
drivers to run a Wayland compositor. Any additional features or
extensions are made optional if possible.
Currently supports drm, wayland, x11 and headless backends.
As of this implementation, this is still considered an experimental
renderer.

Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
2025-05-23 20:36:05 +01:00

16 lines
391 B
GLSL

#version 450
layout(binding = 0) uniform _ubo {
uniform mat4 proj;
uniform mat4 surface_to_buffer;
} ubo;
layout(location = 0) in vec2 position;
/* layout(location = 1) in vec2 texcoord; // unused here */
layout(location = 1) out vec2 v_texcoord;
void main() {
gl_Position = ubo.proj * vec4(position, 0.0, 1.0);
v_texcoord = vec2(ubo.surface_to_buffer * vec4(position, 0.0, 1.0));
}