Files
gio/gpu/shaders/blit.vert
T
Elias Naur c34c350a52 gpu: pack 2D transforms in vec4 values
Instead of separate 2d scale and transform, pack them into a single
4d value.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
2020-02-27 21:22:59 +01:00

24 lines
410 B
GLSL

#version 310 es
// SPDX-License-Identifier: Unlicense OR MIT
precision highp float;
layout(binding = 0) uniform Block {
vec4 transform;
vec4 uvTransform;
float z;
};
layout(location = 0) in vec2 pos;
layout(location = 1) in vec2 uv;
layout(location = 0) out vec2 vUV;
void main() {
vec2 p = pos*transform.xy + transform.zw;
gl_Position = vec4(p, z, 1);
vUV = uv*uvTransform.xy + uvTransform.zw;
}