shader/sprite_frag.glsl

Wed, 02 Jul 2025 23:21:17 +0200

author
Mike Becker <universe@uap-core.de>
date
Wed, 02 Jul 2025 23:21:17 +0200
changeset 174
0009b982bc7d
parent 137
f8e6e0ae61a8
permissions
-rw-r--r--

resolve TODOs regarding input.h

a) mouse position must be integer, because it can be negative (though rarely)
b) we should not trade "access complexity" for space in the scancodes array

layout(location = 0) out vec4 diffuse;
in vec2 uvcoord;

#ifdef USE_RECT
uniform sampler2DRect tex;
#else
uniform sampler2D tex;
#endif

void main(void) {
    diffuse = texture(tex, uvcoord);
}

mercurial