shader/sprite_vtx.glsl

Sat, 02 Aug 2025 13:07:28 +0200

author
Mike Becker <universe@uap-core.de>
date
Sat, 02 Aug 2025 13:07:28 +0200
changeset 239
3b78ad115ccd
parent 137
f8e6e0ae61a8
permissions
-rw-r--r--

remove the possibility of non-lazy-initializable shader programs

it is still possible to pre-initialize them, but whenever they are used,
they should be re-created when they don't exist anymore

layout(location = 0) in vec2 in_pos;
layout(location = 1) in vec2 in_uv;
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;
}

mercurial