gtk2/gsk/resources/vulkan/blit.vert.glsl
Benjamin Otte 81c487b841 vulkan: Fold clip into push constants
As a side effect, the clipping data is now available inside shaders.

Not that any shader would use them yet, but they could!
2016-12-24 06:19:16 +01:00

23 lines
425 B
GLSL

#version 420 core
layout(location = 0) in vec2 inPosition;
layout(location = 1) in vec2 inTexCoord;
layout(push_constant) uniform PushConstants {
mat4 mvp;
vec4 clip_bounds;
vec4 clip_widths;
vec4 clip_heights;
} push;
layout(location = 0) out vec2 outTexCoord;
out gl_PerVertex {
vec4 gl_Position;
};
void main() {
gl_Position = push.mvp * vec4 (inPosition, 0.0, 1.0);
outTexCoord = inTexCoord;
}