shader/sprite_vtx.glsl

Sun, 11 May 2025 14:51:00 +0200

author
Mike Becker <universe@uap-core.de>
date
Sun, 11 May 2025 14:51:00 +0200
changeset 116
bfb2a7d62047
parent 115
e5f8c99b0987
permissions
-rw-r--r--

replace scaling with correct mesh sizes

#version 400 core

layout(location = 0) in vec2 in_pos;
layout(location = 1) in vec2 in_uv;
out vec2 texcoord;
out vec2 uvcoord;

uniform mat4 projection;
uniform mat4 view;
uniform mat4 model;

void main(void) {
    vec4 pos = projection*view*model*vec4(in_pos.xy, 0.0, 1.0);
    gl_Position = pos;
    uvcoord = in_uv;
    // TODO: we don't need that in the future
    texcoord = vec2(model[0].x, model[1].y)*in_pos;
}

mercurial