mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-22 23:30:14 +00:00
20 lines
381 B
Text
20 lines
381 B
Text
|
|
#version 450
|
||
|
|
|
||
|
|
layout(push_constant) uniform Push {
|
||
|
|
vec2 position;
|
||
|
|
float size;
|
||
|
|
float aspectRatio;
|
||
|
|
} push;
|
||
|
|
|
||
|
|
layout(location = 0) in vec2 aPos;
|
||
|
|
layout(location = 1) in vec2 aUV;
|
||
|
|
|
||
|
|
layout(location = 0) out vec2 UV;
|
||
|
|
|
||
|
|
void main() {
|
||
|
|
UV = aUV;
|
||
|
|
vec2 scaled = aPos * push.size;
|
||
|
|
scaled.x /= push.aspectRatio;
|
||
|
|
gl_Position = vec4(scaled + push.position, 0.0, 1.0);
|
||
|
|
}
|